Skip to content

Commit dbb9cb6

Browse files
committed
Try adding comment to the PR
1 parent 958c938 commit dbb9cb6

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

.github/workflows/email-check.yaml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,17 +39,15 @@ jobs:
3939
⚠️ We detected that you are using a GitHub private e-mail address to contribute to the repo.<br/>
4040
Please turn off [Keep my email addresses private](https://github.com/settings/emails) setting in your account.<br/>
4141
See [LLVM Discourse](https://discourse.llvm.org/t/hidden-emails-on-github-should-we-do-something-about-it) for more information.
42+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
43+
GH_REPO: ${{ github.repository }}
44+
PRNUM: ${{ github.event.pull_request.number }}
4245
run: |
4346
cat << EOF > comments
4447
[{"body" : "$COMMENT"}]
4548
EOF
4649
# Use GitHub API to create a comment on the PR
47-
PR_NUMBER=${{ github.event.pull_request.number }}
48-
GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}
49-
COMMENT_URL="https://api.github.com/repos/${{ github.repository }}/issues/${PR_NUMBER}/comments"
50-
51-
curl -s -H "Authorization: token ${GITHUB_TOKEN}" -X POST $COMMENT_URL -d "{\"body\":\"$COMMENT\"}"
52-
50+
gh pr comment $PRNUM --body "$COMMENT" --repo $GH_REPO
5351
# Fail this job.
5452
false
5553

0 commit comments

Comments
 (0)