fix: skip self-review trigger for docker-agent[bot] review comments#180
Conversation
a1193f7 to
13f284e
Compare
There was a problem hiding this comment.
Assessment: 🟢 APPROVE
The fix correctly addresses the feedback loop by adding a job-level if condition on the save-context job. The github.event.comment.user.login context path is the right one for pull_request_review_comment events. For pull_request events (the other trigger), the missing comment object evaluates to an empty string, which correctly passes the inequality check — so legitimate PR open/ready_for_review triggers are unaffected.
No bugs found in the changed code.
docker-agent
left a comment
There was a problem hiding this comment.
Assessment: 🟢 APPROVE
PR #180 — Break self-review feedback loop by skipping docker-agent[bot] comments
The one-line fix is correct and well-targeted. The job-level if guard on save-context effectively stops docker-agent[bot]'s own review comments from re-triggering the PR Review Trigger workflow, breaking the infinite loop.
Analysis:
github.event.comment.user.loginpath correctness — The field is present and populated forpull_request_review_commentevents (the only event type that can carry bot review comments). Forpull_requestevents (ready_for_review,opened),github.event.commentis absent and evaluates to'', making the guard'' != 'docker-agent[bot]'→true— those events always run as intended. Behavior is correct for all trigger types.- Exact string match
'docker-agent[bot]'— This is the canonical GitHub Apps bot login format for thedocker-agentapp. The match is precise and intentional; there is no evidence of variant bot accounts in scope for this workflow.
No bugs or issues found in this change.
- Fix if-guard: docker-agent[bot] → docker-agent (plain machine user, not a GitHub App bot) - Remove the Build job from self-review-pr.yml; its pnpm build output is never consumed by the Review job, and build validation is already covered by test.yml on every PR Assisted-By: docker-agent
13f284e to
eceb236
Compare
Problem
.github/workflows/self-review-pr-trigger.ymlfired on everypull_request_review_commentevent — including inline comments posted by thedocker-agent[bot]reviewer itself (marked<!-- cagent-review -->). This created a feedback loop:Fix
Added a job-level
ifcondition to thesave-contextjob inself-review-pr-trigger.ymlthat skips the run when the comment author isdocker-agent[bot]:self-review-pr.ymlwas also inspected — it hasissue_commentandworkflow_runtriggers but nopull_request_review_commenttrigger, so no change is needed there.Validation
pnpm build✅pnpm lint(Biome + tsc + actionlint) ✅ — no errorsAssisted-By: docker-agent