Skip to content

fix: PR triage review feedback (synchronize trigger, thread header, comment clarity)#41

Merged
Kavirubc merged 2 commits intomainfrom
fix/pr-review-feedback
Feb 13, 2026
Merged

fix: PR triage review feedback (synchronize trigger, thread header, comment clarity)#41
Kavirubc merged 2 commits intomainfrom
fix/pr-review-feedback

Conversation

@Kavirubc
Copy link
Copy Markdown
Contributor

@Kavirubc Kavirubc commented Feb 13, 2026

Summary

Follow-up fixes on top of #39 (feat: support pull request events in triage pipeline).

  • Remove synchronize from PR workflow trigger — running duplicate/similarity detection on every commit push to a PR is noisy and unnecessary. The bot now only fires on opened, edited, reopened.
  • Fix "Thread" column header in Similar results table — the column was still labeled "Issue" after the summary was renamed to "Similar Threads". Updated to "Thread" so it correctly describes both issues and PRs.
  • Add clarifying comment in command_handler.go — explains why issue_comment events skip analyzeHistoryForLoops (they are fully handled earlier: dispatched if a command, pipeline-skipped otherwise — only non-comment events reach that check).

Test plan

  • go build ./... passes
  • go vet ./... passes
  • go test ./... passes
  • No functional changes — all fixes are config/copy/comment only (except the trigger change which is intentional behaviour correction)

Summary by CodeRabbit

  • Documentation

    • Updated example workflow docs to stop triggering on pull request synchronization, focusing on primary PR lifecycle events.
    • Clarified event-handling explanations to better describe comment and request processing.
  • Updates

    • Improved results display by relabeling similar items from "Issue" to "Thread" for clearer context.

- 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>
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Feb 13, 2026

📝 Walkthrough

Walkthrough

The PR removes the synchronize pull_request type from two example GitHub Actions workflows, clarifies inline comments in the command handler about issue/pr comment handling and history scans, and renames a table column header from "Issue" to "Thread" in the response builder.

Changes

Cohort / File(s) Summary
Workflow Trigger Configuration
DOCS/examples/multi-repo/caller-workflow.yml, DOCS/examples/single-repo/workflow.yml
Removed synchronize from pull_request.types, changing triggers from [opened, edited, reopened, synchronize] to [opened, edited, reopened].
Command Handler Comments
internal/steps/command_handler.go
Expanded/clarified inline comments describing that issue_comment is handled earlier and that history scans apply to issue, pull_request, and pr_comment to prevent transfer/loop re-triage; no functional change.
Response Builder UI
internal/steps/response_builder.go
Renamed the similar-items table header column from "Issue" to "Thread" in buildSimilarSection; no other logic changes.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Poem

🐰
I hopped through workflows, gentle and spry,
Snipped a synchronize from the sky,
Whispered comments clear and neat,
Renamed "Issue" to "Thread" — what a treat!
🥕✨

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly summarizes the three main changes: removing synchronize trigger, updating thread header, and clarifying comments.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Merge Conflict Detection ✅ Passed ✅ No merge conflicts detected when merging into main

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/pr-review-feedback

No actionable comments were generated in the recent review. 🎉


Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.synchronize from 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.Run about why issue_comment is 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.

Comment thread internal/steps/command_handler.go Outdated
Comment on lines +66 to +69
// 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.
Copy link

Copilot AI Feb 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
- 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
@Kavirubc Kavirubc merged commit 7be6b86 into main Feb 13, 2026
4 checks passed
@Kavirubc Kavirubc deleted the fix/pr-review-feedback branch February 13, 2026 04:12
@Kavirubc Kavirubc mentioned this pull request Feb 13, 2026
17 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants