fix: PR triage review feedback (synchronize trigger, thread header, comment clarity)#41
fix: PR triage review feedback (synchronize trigger, thread header, comment clarity)#41
Conversation
- Remove `synchronize` from pull_request workflow triggers to avoid running triage on every commit push to a PR (opened/edited/reopened only) - Fix "Issue" column header to "Thread" in Similar Threads table so it correctly describes both issues and PRs - Add comment in command_handler.go explaining why issue_comment events bypass analyzeHistoryForLoops (they are fully handled earlier in the fn) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
📝 WalkthroughWalkthroughThe PR removes the Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
No actionable comments were generated in the recent review. 🎉 Comment |
There was a problem hiding this comment.
Pull request overview
Follow-up cleanup to the PR triage pipeline UX/config by reducing noisy PR-triggered runs, correcting similarity table labeling, and clarifying command-handler control flow for comment events.
Changes:
- Removed
pull_request.synchronizefrom the documented workflow triggers to avoid running triage on every PR push. - Updated “Similar Threads” markdown table header from “Issue” to “Thread”.
- Added an explanatory comment in
CommandHandler.Runabout whyissue_commentis excluded from loop-prevention history analysis.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| internal/steps/response_builder.go | Renames Similar section table column header to “Thread” for correctness across issues/PRs. |
| internal/steps/command_handler.go | Adds clarification comment around event-type gating for loop-prevention history checks. |
| DOCS/examples/single-repo/workflow.yml | Removes synchronize from PR trigger types in the example workflow. |
| DOCS/examples/multi-repo/caller-workflow.yml | Removes synchronize from PR trigger types in the multi-repo caller example. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| // For standard issue/PR events, check history for undo commands to prevent loops. | ||
| // issue_comment is excluded here because it was already handled above: if it contained | ||
| // a /command it was dispatched; if not, the pipeline was skipped entirely. Only | ||
| // non-comment events reach this point and need the loop-prevention check. |
There was a problem hiding this comment.
The new comment is misleading: pr_comment is also a comment event, but it still reaches this point and will run analyzeHistoryForLoops. Also, /command handling here only dispatches /undo; unknown /... commands just log and return nil (so it isn’t always “dispatched”). Please reword to accurately describe which event types can reach this block and what actually happens for comment commands.
- pr_comment does reach analyzeHistoryForLoops (was wrongly excluded) - unknown /commands log and return nil, not 'dispatched' - clarify that issue_comment never reaches the loop-prevention check Addresses Copilot review on PR #41
Summary
Follow-up fixes on top of #39 (feat: support pull request events in triage pipeline).
synchronizefrom PR workflow trigger — running duplicate/similarity detection on every commit push to a PR is noisy and unnecessary. The bot now only fires onopened,edited,reopened.command_handler.go— explains whyissue_commentevents skipanalyzeHistoryForLoops(they are fully handled earlier: dispatched if a command, pipeline-skipped otherwise — only non-comment events reach that check).Test plan
go build ./...passesgo vet ./...passesgo test ./...passesSummary by CodeRabbit
Documentation
Updates