Skip to content

Commit 0bc63b6

Browse files
committed
chore: process more review feedback
1 parent 880c891 commit 0bc63b6

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

.github/actions/sticky-pr-comment/action.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff 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}"
@@ -84,7 +84,7 @@ runs:
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

0 commit comments

Comments
 (0)