Skip to content

Commit 0cbf7c4

Browse files
Add pr_number to outputs
As requested in #104 Also updated setting outputs to a new format.
1 parent 2dea7a8 commit 0cbf7c4

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,10 @@ Features:
7878
| title | No | *subject of the first commit* | Pull request title. |
7979

8080

81-
| Outputs | Description |
82-
| ------- | ---------------- |
83-
| url | Pull request URL |
81+
| Outputs | Description |
82+
| --------- | ----------------------------- |
83+
| url | Pull request URL |
84+
| pr_number | Number of GitHub pull request |
8485

8586

8687
### How get_diff works

entrypoint.sh

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ if [[ -z "${PR_NUMBER}" ]]; then
165165
echo -e "\n${TEMPLATE}" >> /tmp/template
166166
echo -e "\nTemplate:"
167167
cat /tmp/template
168-
# shellcheck disable=SC2016
168+
# shellcheck disable=SC2016,SC2124
169169
COMMAND="hub pull-request -b ${TARGET_BRANCH} -h ${SOURCE_BRANCH} --no-edit ${ARG_LIST[@]}"
170170
echo -e "\nRunning: ${COMMAND}"
171171
URL=$(sh -c "${COMMAND}")
@@ -181,7 +181,10 @@ else
181181
fi
182182

183183
# Finish
184-
echo "::set-output name=url::${URL}"
184+
{
185+
echo "url=${URL}"
186+
echo "pr_number=${PR_NUMBER}"
187+
} >> "$GITHUB_OUTPUT"
185188
if [[ ${RET_CODE} != "0" ]]; then
186189
echo -e "\n[ERROR] Check log for errors."
187190
exit 1

0 commit comments

Comments
 (0)