Skip to content

fix(ci): verify comment author before updating/deleting impact comment - #2496

Merged
carlos-alm merged 1 commit into
mainfrom
fix/issue-2352-impact-comment-author-check
Aug 14, 2026
Merged

fix(ci): verify comment author before updating/deleting impact comment#2496
carlos-alm merged 1 commit into
mainfrom
fix/issue-2352-impact-comment-author-check

Conversation

@carlos-alm

Copy link
Copy Markdown
Contributor

Summary

Test plan

  • YAML syntax validated
  • No existing tests reference this workflow file (not part of the TS/JS test suite — a .github/workflows/*.yml change, not application code)
  • Confirmed no other workflow files have the same unguarded pattern (grep across .github/workflows/)

Closes #2352

codegraph-impact-comment.yml's sticky-comment lookup selected an
existing comment to update purely by body.startsWith(marker), with no
check that the comment was actually posted by the workflow's own bot
account — the same gap Greptile flagged (Confidence 3/5) on PR #2351
for closing-keyword-check.yml's identical pattern. Any PR participant
posting a comment starting with the same marker text would have it
silently overwritten the next time this workflow runs for that PR.

Adds the same c.user.login === 'github-actions[bot]' check #2351's
fix already applies to closing-keyword-check.yml.

Closes #2352
@greptile-apps

greptile-apps Bot commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR prevents participant-authored comments from being mistaken for the workflow’s sticky impact comment.

  • Restricts impact-comment lookup to comments authored by github-actions[bot]
  • Preserves creation and update behavior for comments produced by the workflow’s existing token

Confidence Score: 5/5

The PR appears safe to merge with no actionable issues identified.

The workflow’s automatic GitHub token creates comments as github-actions[bot], so the added author predicate continues to find legitimate sticky comments while preventing participant comments containing the marker from being updated.

Important Files Changed

Filename Overview
.github/workflows/codegraph-impact-comment.yml Safely narrows the sticky-comment lookup to the workflow bot’s comments without changing the workflow’s own comment identity or update path.

Reviews (1): Last reviewed commit: "fix(ci): verify comment author before up..." | Re-trigger Greptile

@carlos-alm
carlos-alm merged commit 0536021 into main Aug 14, 2026
27 checks passed
@carlos-alm
carlos-alm deleted the fix/issue-2352-impact-comment-author-check branch August 14, 2026 08:30
@github-actions github-actions Bot locked and limited conversation to collaborators Aug 14, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

follow-up: codegraph-impact-comment.yml comment lookup doesn't verify author, same pattern Greptile flagged on #2351

1 participant