mirror of
https://github.com/github/codeql.git
synced 2026-04-21 06:55:31 +02:00
Use environment variable instead of GH context
This commit is contained in:
4
.github/workflows/post-pr-comment.yml
vendored
4
.github/workflows/post-pr-comment.yml
vendored
@@ -48,10 +48,10 @@ jobs:
|
||||
if [ -z "$COMMENT_ID" ]
|
||||
then
|
||||
# Create new comment
|
||||
jq --rawfile body comment_body.txt '{"body":$body}' -n | gh api "repos/${{ github.repository }}/issues/${PR_NUMBER}/comments" -X POST --input -
|
||||
jq --rawfile body comment_body.txt '{"body":$body}' -n | gh api "repos/${GITHUB_REPOSITORY}/issues/${PR_NUMBER}/comments" -X POST --input -
|
||||
else
|
||||
# Update existing comment
|
||||
jq --rawfile body comment_body.txt '{"body":$body}' -n | gh api "repos/${{ github.repository }}/issues/comments/${COMMENT_ID}" -X PATCH --input -
|
||||
jq --rawfile body comment_body.txt '{"body":$body}' -n | gh api "repos/${GITHUB_REPOSITORY}/issues/comments/${COMMENT_ID}" -X PATCH --input -
|
||||
fi
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ github.token }}
|
||||
|
||||
Reference in New Issue
Block a user