Skip to content

Commit 3d20c33

Browse files
committed
graphql
1 parent f3a616e commit 3d20c33

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

.github/actions/docker-image-comment/action.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,13 @@ runs:
6969
echo "Found existing comment(s), deleting to avoid duplicates..."
7070
while IFS= read -r comment_id; do
7171
if [ -n "$comment_id" ]; then
72-
gh api \
73-
--method DELETE \
74-
-H "Accept: application/vnd.github+json" \
75-
"/repos/${GITHUB_REPOSITORY}/issues/comments/${comment_id}" 2>/dev/null || true
72+
# Use GraphQL mutation to delete by node ID
73+
gh api graphql -f query='
74+
mutation($id: ID!) {
75+
deleteIssueComment(input: {id: $id}) {
76+
clientMutationId
77+
}
78+
}' -f id="$comment_id" 2>/dev/null || true
7679
fi
7780
done <<< "$COMMENT_IDS"
7881
fi

0 commit comments

Comments
 (0)