File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -50,15 +50,15 @@ runs:
5050 GH_TOKEN : ${{ github.token }}
5151 PR_NUMBER : ${{ inputs.pr-number }}
5252 MARKER : ${{ inputs.marker }}
53+ BODY : ${{ inputs.body }}
5354 shell : bash
5455 run : |
5556 set -Eeuo pipefail
5657
5758 MARKER_COMMENT="<!-- ${MARKER} -->"
58- FULL_BODY="${MARKER_COMMENT}\n${{ inputs.body }}"
59- EXISTING_ID=$(gh api "repos/${GITHUB_REPOSITORY}/issues/${PR_NUMBER}/comments" --jq \
60- ".[] | select(.body|contains(\"${MARKER_COMMENT}\")) | .id" | head -n1 || true)
61-
59+ FULL_BODY="${MARKER_COMMENT}\n${BODY}"
60+ EXISTING_ID=$(gh api "repos/${GITHUB_REPOSITORY}/issues/${PR_NUMBER}/comments" --jq ".[] | select(.body|contains(\"${MARKER_COMMENT}\")) | .id" | head -n1 || true)
61+
6262 if [ -n "${EXISTING_ID}" ]; then
6363 echo "Updating existing sticky comment (${EXISTING_ID})"
6464 gh api "repos/${GITHUB_REPOSITORY}/issues/comments/${EXISTING_ID}" -X PATCH -f body="${FULL_BODY}"
8484 exit 0;
8585 fi
8686
87- for id in $FOUND_IDS; do
87+ for id in ${ FOUND_IDS} ; do
8888 echo "Deleting sticky comment $id"
8989 gh api "repos/${GITHUB_REPOSITORY}/issues/comments/${id}" -X DELETE
9090 done
You can’t perform that action at this time.
0 commit comments