You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
dev-lead: enable auto-merge (squash) by default on every PR it works on #446
The dev-lead agent enables GitHub auto-merge with squash, but only when a PR's reviewDecision is already APPROVED (see try_enable_auto_merge in scripts/dev-lead-fix-reviews.sh). That eligibility gate, plus the fact that the check only runs as a side-effect of a handful of intents, leaves several cases where auto-merge is never enabled.
Edge cases where auto-merge never gets enabled
Bot approves while a required human/code-owner review is outstanding. A trusted-bot APPROVED review emits the enable-auto-merge intent, but reviewDecision is REVIEW_REQUIRED, so the function no-ops. Nothing re-attempts it.
No standalone re-check.try_enable_auto_merge only runs as a side-effect of enable-auto-merge / fix-reviews / fix-bot-comment / review-changes. The retry cron only re-dispatches status=rate-limited markers, which a no-op'd enable never writes. So a PR that becomes APPROVED+mergeable via a non-review event (dismissed blocking review, last required check passing) is never picked up.
Human APPROVED review. Routes to review-changes, which runs a full engine pass; try_enable_auto_merge sits behind rc == 0, so a hard engine failure blocks auto-merge — and it spends an LLM run just to enable a merge.
on-mention never calls it at all.
Proposed fix (per maintainer direction)
Stop gating on reviewDecision. GitHub already holds an auto-merge PR until branch protection is satisfied (required reviews approved, review threads resolved, required checks green), so enabling early is safe and the PR merges the moment it becomes mergeable — no further dev-lead event required.
Drop the reviewDecision == APPROVED gate in try_enable_auto_merge (keep idempotency when auto-merge is already on).
Call try_enable_auto_merge from the on-mention path too (PR mentions only).
Assumption: relies on the standard pr-quality branch-protection ruleset (required review + required checks + conversation resolution) being configured, which is the documented org standard. Without it, --auto could merge a PR with no gating checks immediately.
Activity