Skip to content

Blocked merge detection - #12

Merged
Dal-Papa merged 8 commits into
mainfrom
dal-papa/blocked-merge-detection
Sep 16, 2026
Merged

Dal-Papa merged 8 commits into
mainfrom
dal-papa/blocked-merge-detection

Conversation

@Dal-Papa

Copy link
Copy Markdown
Contributor
  • Marvin now reads a PR's mergeable_state before calling GitHub's async merge endpoint, which accepts a merge request and then rejects it in the background with no webhook, leaving the PR labelled and silent.
  • dirty / draft / behind → merge label removed, comment naming the reason.
  • blocked with checks still running → label kept, retried on check-run completion (unchanged behaviour).
  • blocked with all checks done → label removed, comment listing the base branch's requirements.
  • clean / unstable / unknown / has_hooks → merge proceeds exactly as before.
  • New BranchRequirements renders a branch's rules (classic protection or rulesets) as readable bullets, falling back to a generic checklist when they can't be read.
  • All merge-cancel paths funnel through attemptMerge's deferred cleanup, so a transient GitHub error can't strand a labelled PR.

@Dal-Papa
Dal-Papa requested a review from boolangery September 16, 2026 15:51
@Dal-Papa Dal-Papa added the enhancement New feature or request label Sep 16, 2026
boolangery
boolangery previously approved these changes Sep 16, 2026
@Dal-Papa
Dal-Papa merged commit 9beb93d into main Sep 16, 2026
3 checks passed
@Dal-Papa
Dal-Papa deleted the dal-papa/blocked-merge-detection branch September 16, 2026 16:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants