AGENT SKILL

mergeable-please

Drive a GitHub pull request toward mergeable. Run when asked to "make a PR mergeable", "loop until the PR is ready", "fix the PR until CI/conflicts/reviews pass", or similar. Repeatedly runs `mergeable-please check`, resolves each reported blocker (conflicts, behind-base, failing/pending required CI, reviewer-loop goals), and loops until the tool reports satisfied.

License 许可
MIT
最近更新
2026-07-27
Stars
★ 0
Forks
0

01 前言 Front Matter

name
mergeable-please
license
MIT
description
Drive a GitHub pull request toward mergeable. Run when asked to "make a PR mergeable", "loop until the PR is ready", "fix the PR until CI/conflicts/reviews pass", or similar. Repeatedly runs `mergeable-please check`, resolves each reported blocker (conflicts, behind-base, failing/pending required CI, reviewer-loop goals), and loops until the tool reports satisfied.
allowed_tools
[ "Bash", "Read" ]
compatibility
[ "claude", "codex", "agents" ]

03 SKILL.md 正文

mergeable-please

Loop a GitHub pull request to merge-readiness. mergeable-please is a stateless, single-shot CLI: it diagnoses every merge condition the agent can act on and tells you the next action. You drive the loop by re-running it after each fix.

The loop

  1. Run mergeable-please check (add the PR number or URL if you are not on the PR's branch, e.g. mergeable-please check 42).
  2. check prints a task list. The first line is the header status: satisfied|blocked · owner/repo#n <url>; then one checkbox per merge condition and reviewer. Each item may carry indented supplements: a status line (e.g. rally 3/5 · goal approved) and a → action naming the next move and, after ·, the one view/request subcommand for depth. Trailing ~ lines are human-only notes. Read the exit code and header:
    • exit 0 / status: satisfied → stop. Every - [x] is done; only human-gated ~ advisories (if any) remain.
    • exit 1 / status: blocked → the - [ ] items are outstanding. Work them top-down, following each item's indented → action, then go back to step 1.
    • exit 2 → a usage/config/API error. Read the message and fix the invocation (do not loop on this).
  3. For depth on any item, run the subcommand from its → action (e.g. mergeable-please view --condition checks|conflicts|rules|reviewers) — check itself stays terse. Resolve each outstanding - [ ] item by its kind, then go back to step 1:
    • conflict → merge or rebase the base branch, resolve conflicts, commit, push.
    • behind-base → the repo enforces up-to-date branches. Rebase onto the base and push (git fetch && git rebase origin/<base> && git push --force-with-lease).
    • check-failing → run mergeable-please view --condition checks to see which required checks failed, investigate the root cause, fix it, push.
    • check-pending → required checks are still running. Wait, then re-run check.
    • merge-eligibility-pending → GitHub is still computing the merge state. Wait 15–30 seconds and re-run check.
    • reviewer N unresolved → resolve those conversations first (mergeable-please view --condition reviewers shows them), push, then (re)request with mergeable-please request --reviewer <type:name>. Re-requests are blocked until the head advances, so always push your fix first. After (re)requesting, the reviewer needs time to respond — poll in a background shell (e.g. run sleep 60 && mergeable-please check as a background job, never in the foreground) so you are not blocked.
    • reviewer changes requested → the reviewer formally requested changes. Read the review body and any threads (view --condition reviewers), address the feedback, push, then re-request. If you genuinely cannot address the request (e.g. it asks for a change you should not make) and no new commit is possible, stop and escalate to the human — the tool will keep reporting blocked, which is correct, and you must not loop. The item's → action says exactly this when it applies.
    • reviewer awaiting review → no outstanding request; (re)request and poll in the background as above.
  4. The trailing ~ lines are NOT blockers and never prevent satisfied:
    • ~ approval required (human) / ~ ruleset block … → require a human or out-of-scope action. Report them as remaining follow-ups; do not try to satisfy them yourself.
    • ~ review notes present … → a reviewer left a review body that may contain findings not tied to any inline thread (e.g. CodeRabbit "outside diff range" comments). Read it with mergeable-please view --condition reviewers.
    • ~ … exhausted … → a reviewer used all its rallies without meeting its goal; stop the loop for it or raise max-rallies.

Notes

  • Prefer the exit code as the stop signal; the status: line is the human/agent mirror of it.
  • Reviewer quality loops are opt-in via .mergeable-please.yml at the repo root. With no config file, check evaluates conflicts and ruleset/CI only.
  • After pushing a fix, give CI a moment before re-running check.

04 同仓库更多 Skills

sushichan044
sushichan044/mergeable-please

golang-troubleshooting

Troubleshoot Golang programs systematically - find and fix the root cause. Use when encountering bugs, crashes, deadlocks, or unexpected behavior in Go code. Covers debugging methodology, common Go pitfalls, test-driven debugging, pprof setup and capture, Delve debugger, race detection, GODEBUG tracing, and production debugging. Start here for any 'something is wrong' situation. Not for interpreting profiles or benchmarking (→ See `samber/cc-skills-golang@golang-benchmark` skill) or applying optimization patterns (→ See `samber/cc-skills-golang@golang-performance` skill).

★ 0
sushichan044
sushichan044/mergeable-please

golang-testing

Production-ready Golang tests — table-driven tests, testify suites and mocks, parallel tests, fuzzing, fixtures, goroutine leak detection with goleak, snapshot testing, code coverage, integration tests, idiomatic test naming. Use when writing or reviewing Go tests, choosing a testing approach, setting up Go test CI, or debugging flaky/slow tests. For testify-specific APIs see `samber/cc-skills-golang@golang-stretchr-testify`; for measurement methodology see `samber/cc-skills-golang@golang-benchmark`.

★ 0
sushichan044
sushichan044/mergeable-please

golang-structs-interfaces

Golang struct and interface design patterns — composition, embedding, type assertions, type switches, interface segregation, dependency injection via interfaces, struct field tags, and pointer vs value receivers. Use this skill when designing Go types, defining or implementing interfaces, embedding structs or interfaces, writing type assertions or type switches, adding struct field tags for JSON/YAML/DB serialization, or choosing between pointer and value receivers. Also use when the user asks about "accept interfaces, return structs", compile-time interface checks, or composing small interfaces into larger ones.

★ 0
sushichan044
sushichan044/mergeable-please

golang-stretchr-testify

Comprehensive guide to stretchr/testify for Golang testing. Covers assert, require, mock, and suite packages in depth. Use when writing tests with testify, creating mocks, setting up test suites, or choosing between assert and require. Covers testify assertions, mock expectations, argument matchers, call verification, suite lifecycle, and advanced patterns like Eventually, JSONEq, and custom matchers. Apply when the codebase imports github.com/stretchr/testify.

★ 0
sushichan044
sushichan044/mergeable-please

golang-spf13-cobra

Golang CLI command tree library using spf13/cobra — cobra.Command, RunE vs Run, PersistentPreRunE hook chain, Args validators (NoArgs, ExactArgs, MatchAll, custom), persistent vs local flags, command groups, ValidArgsFunction, RegisterFlagCompletionFunc, ShellCompDirective, usage/help template customization, man-page and markdown doc generation, and testing with SetArgs/SetOut/SetErr. Apply when using or adopting spf13/cobra, or when the codebase imports `github.com/spf13/cobra`. For configuration layering alongside cobra, see the `samber/cc-skills-golang@golang-spf13-viper` skill. For general CLI architecture (project layout, exit codes, signal handling, I/O patterns), see `samber/cc-skills-golang@golang-cli`.

★ 0
sushichan044
sushichan044/mergeable-please

golang-security

Security best practices and vulnerability prevention for Golang. Covers injection (SQL, command, XSS), cryptography, filesystem safety, network security, cookies, secrets management, memory safety, and logging. Apply when writing, reviewing, or auditing Go code for security, or when working on any risky code involving crypto, I/O, secrets management, user input handling, or authentication. Includes configuration of security tools.

★ 0