Skip to content

Commit 500af72

Browse files
committed
handle-pr-comment: look for the PR in the correct repo
Signed-off-by: Johannes Schindelin <[email protected]>
1 parent 2684137 commit 500af72

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

.github/workflows/handle-pr-comment.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,11 @@ jobs:
5656
5757
PR_NUMBER="${PR_COMMENT_URL%#*}" # skip the suffix with the comment ID
5858
PR_NUMBER="${PR_NUMBER##*/}" # skip the prefix before the PR number
59+
PR_REPO="${PR_COMMENT_URL%/$PR_NUMBER*#*}" # skip the suffix including the PR number
60+
PR_REPO="${PR_REPO#https://.*/}"
5961
6062
export GH_TOKEN="${{ secrets.GITHUB_TOKEN }}"
61-
eval "$(gh api repos/gitgitgadget/git/pulls/$PR_NUMBER \
63+
eval "$(gh api repos/$PR_REPO/pulls/$PR_NUMBER \
6264
--jq '"head_sha=\(.head.sha) && repo=\(.base.repo.full_name)"')"
6365
echo "head_sha=$head_sha" >> $GITHUB_OUTPUT
6466
echo "repo=$repo" >> $GITHUB_OUTPUT

0 commit comments

Comments
 (0)