File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3333 shell : bash
3434 env :
3535 GH_TOKEN : ${{ inputs.github_token }}
36+ GITHUB_REPOSITORY : ${{ github.repository }}
3637 PR_NUMBER : ${{ inputs.pr_number }}
3738 COMMENT_TAG : ${{ inputs.comment_tag }}
3839 IMAGE_NAME : ${{ inputs.image_name }}
5960
6061 # Find existing comment
6162 COMMENT_ID=$(gh pr view ${PR_NUMBER} \
62- --repo ${{ github.repository } } \
63+ --repo ${GITHUB_REPOSITORY } \
6364 --json comments \
6465 --jq '.comments[] | select(.body | contains("'"${COMMENT_IDENTIFIER}"'")) | .id')
6566
@@ -70,17 +71,17 @@ runs:
7071 if ! gh api \
7172 --method PATCH \
7273 -H "Accept: application/vnd.github+json" \
73- "/repos/${{ github.repository } }/issues/comments/${COMMENT_ID}" \
74+ "/repos/${GITHUB_REPOSITORY }/issues/comments/${COMMENT_ID}" \
7475 -f body="${COMMENT_BODY}" 2>/dev/null; then
7576 # Comment no longer exists, create a new one
7677 gh pr comment ${PR_NUMBER} \
77- --repo ${{ github.repository } } \
78+ --repo ${GITHUB_REPOSITORY } \
7879 --body "${COMMENT_BODY}"
7980 fi
8081 else
8182 # Create new comment
8283 gh pr comment ${PR_NUMBER} \
83- --repo ${{ github.repository } } \
84+ --repo ${GITHUB_REPOSITORY } \
8485 --body "${COMMENT_BODY}"
8586 fi
8687 else
8990 gh api \
9091 --method DELETE \
9192 -H "Accept: application/vnd.github+json" \
92- "/repos/${{ github.repository } }/issues/comments/${COMMENT_ID}" 2>/dev/null || true
93+ "/repos/${GITHUB_REPOSITORY }/issues/comments/${COMMENT_ID}" 2>/dev/null || true
9394 fi
9495 fi
You can’t perform that action at this time.
0 commit comments