From 1cf2530feb16bb8e065b81f8f720a1af32211dd0 Mon Sep 17 00:00:00 2001 From: Harry Maclean Date: Mon, 4 Apr 2022 10:18:41 +1200 Subject: [PATCH] Use environment variable instead of GH context --- .github/workflows/post-pr-comment.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/post-pr-comment.yml b/.github/workflows/post-pr-comment.yml index 7652a7d7dac..6c680d15be0 100644 --- a/.github/workflows/post-pr-comment.yml +++ b/.github/workflows/post-pr-comment.yml @@ -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 }}