AR-99: add pr-reviewer merge-on-green handling
Merged
KH
5mo ago+538+538+012345678901234567890123456789-23-23-01234567890123456789
Summary
- add
merge-on-greenhandling inside thereviewpr-reviewer agent across AgentWorkforce repos - evaluate current PR state before merging: label present, checks complete/passing, requested bot reviewers approved, no bot changes-requested
- merge with the current head SHA through the existing GitHub helper
- add Slack merge-request handling that replies with blockers when a mentioned merge request is not green/satisfied
Validation
- npm test
- npm run typecheck
cloud#2061 was closed unmerged per dispatcher correction. Do not merge this PR without human approval.
Summary by cubic
Adds merge-on-green to the PR reviewer so PRs in the AgentWorkforce org auto-merge when labeled and all gates pass. Also lets Slack users ask the reviewer to merge; it merges if green or replies with blockers. (Linear AR-99)
-
New Features
- Merge-on-green gate: label
merge-on-green, PR open and not draft, no conflicts, green checks, requested bot reviewers approved, and no bot “changes requested”. - Listens to
issues.labeled, commitstatus,check_run.completed, review submissions, and sync/open events; resolves PRs from commit-status SHAs. - Merges using the current head SHA via the existing GitHub helper.
- Slack: parses “please merge …PR URL” in the configured channel; merges when ready or replies with specific blockers.
- Merge-on-green gate: label
-
Refactors
- Extended PR parsing to handle issue-labeled payloads and normalize label reads.
- Added decision helpers for merge-on-green evaluation and Slack reply handling, with tests.
- Kept the persona Slack scope on
/slack/channels/**so channel writebacks work for merge replies.