Skip to content

Commit accaa5a

Browse files
fix: correct GitHub API path for deleting label-reminder comment (#157)
The DELETE endpoint for issue comments does not include the issue number in the path (`/repos/{owner}/{repo}/issues/comments/{comment_id}`), unlike the LIST endpoint which does. The extra `$PR_NUMBER` segment produced a 404, leaving stale reminder comments on PRs after the codebuild label was added. Co-authored-by: Scott Schreckengaust <345885+scottschreckengaust@users.noreply.github.com>
1 parent 7bd9218 commit accaa5a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

.github/workflows/codebuild.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ jobs:
114114
echo "No label-reminder comment found — nothing to clean up"
115115
exit 0
116116
fi
117-
if gh api -X DELETE "repos/$REPO/issues/$PR_NUMBER/comments/$COMMENT_ID"; then
117+
if gh api -X DELETE "repos/$REPO/issues/comments/$COMMENT_ID"; then
118118
echo "Removed label-reminder comment ($COMMENT_ID)"
119119
else
120120
echo "::warning::Failed to delete label-reminder comment ($COMMENT_ID) — it may have been removed already"

0 commit comments

Comments
 (0)