diff --git a/README.md b/README.md index 4319fe6..6314230 100644 --- a/README.md +++ b/README.md @@ -78,9 +78,10 @@ Features: | title | No | *subject of the first commit* | Pull request title. | -| Outputs | Description | -| ------- | ---------------- | -| url | Pull request URL | +| Outputs | Description | +| --------- | ----------------------------- | +| url | Pull request URL | +| pr_number | Number of GitHub pull request | ### How get_diff works diff --git a/entrypoint.sh b/entrypoint.sh index 1443739..66ae8bd 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -165,7 +165,7 @@ if [[ -z "${PR_NUMBER}" ]]; then echo -e "\n${TEMPLATE}" >> /tmp/template echo -e "\nTemplate:" cat /tmp/template - # shellcheck disable=SC2016 + # shellcheck disable=SC2016,SC2124 COMMAND="hub pull-request -b ${TARGET_BRANCH} -h ${SOURCE_BRANCH} --no-edit ${ARG_LIST[@]}" echo -e "\nRunning: ${COMMAND}" URL=$(sh -c "${COMMAND}") @@ -181,7 +181,10 @@ else fi # Finish -echo "::set-output name=url::${URL}" +{ + echo "url=${URL}" + echo "pr_number=${PR_NUMBER}" +} >> "$GITHUB_OUTPUT" if [[ ${RET_CODE} != "0" ]]; then echo -e "\n[ERROR] Check log for errors." exit 1