Repository navigation
Replace code-review slash command with DispatchOps polling dispatcher - #5
Conversation
…g reviews, add content fingerprinting Agent-Logs-Url: https://github.com/jeffhandley/runtime/sessions/c68d26c4-65b0-48ad-b881-be34be339669 Co-authored-by: jeffhandley <[email protected]>
|
@copilot this is way too complicated. Try a new polling approach to find all PRs (from any author) that are open, non-draft, non-empty, with at least 5 minutes since the last push/synchronize, were the code-review skill has not yet run on the current state of the PR, and dispatch code-review runs against them. This follows the DispatchOps approach from gh-aw. |
…-review-dispatcher.yml, simplify code-review Agent-Logs-Url: https://github.com/jeffhandley/runtime/sessions/427355ad-6f33-4275-836f-2e9820698c59 Co-authored-by: jeffhandley <[email protected]>
Done in commit
Dispatches up to 3 reviews per cycle; the next poll picks up any remaining PRs.
|
Replaces the complex slash-command-triggered concurrency approach with a simple DispatchOps polling pattern that automatically finds and reviews qualifying PRs on a schedule.
Problems Fixed
Original issue: any comment could cancel a running review
The previous concurrency group expression grouped any PR comment (not just slash commands) from the PR author into the same cancellation bucket, causing regular discussion comments to silently kill in-progress reviews. The fix attempts using complex
startsWithguards and per-actor fallback groups proved too complicated to reason about safely.New approach: scheduled polling dispatcher
Instead of reacting to comments, a new
code-review-dispatcher.ymlworkflow runs every 15 minutes and dispatchescode-reviewruns automatically. A PR is eligible when all of the following are true:<!-- aw-code-review-sha: <current-head-sha> -->(posted by the code-review agent after each completed review)Up to 3 reviews are dispatched per cycle; subsequent polls pick up any remainder.
Files Changed
.github/workflows/code-review-dispatcher.yml(new) — standard GitHub Actions workflow (no agentic machinery needed; logic is fully deterministic). Runs on a 15-minute cron and manualworkflow_dispatch. Uses a single-instance concurrency group (code-review-dispatcher, no cancel) to prevent overlapping polls. Requiresactions: writeto triggerworkflow_dispatchoncode-review.lock.yml..github/workflows/code-review.md— simplified toworkflow_dispatch-only. Removed slash command trigger, complex concurrency expression, pre-activation authorization checks, andhide-commentsafe output. Now uses a simple per-PR concurrency group (code-review-{pr_number},cancel-in-progress: false) so a queued dispatch never stomps a running review. Agent body updated to always fetch/checkout the PR branch and embed<!-- aw-code-review-sha: SHA -->in every review comment..github/workflows/code-review.lock.yml— updated to match: removedissue_comment/pull_request_review_commenttriggers, simplified concurrency block, removedauthorize-invokerpre-activation step and its outputs, simplified activationif:condition.Note
This PR was generated by GitHub Copilot.