github-auto-merge-setup
БесплатноБез исполняемых скриптовНе проверенDiagnose and fix 'gh pr merge --auto' failures and set up CI-green auto-merge for GitHub repos/workflows. Use when: 'gh pr merge --auto' or a workflow merge…
от ericmjl★ 45 звёзд на GitHubОб этом скилле
Github Auto Merge Setup
Diagnose and fix 'gh pr merge --auto' failures and set up CI-green auto-merge for GitHub repos/workflows. Use when: 'gh pr merge
Instructions
TODO: Add specific instructions based on observed patterns.
## The Three-Layer Auto-Merge Gate
- GitHub enables auto-merge (merge-when-green) ONLY when all THREE independent conditions hold. Diagnose top-down; a failure at any layer produces a DIFFERENT error:
LAYER 1 — Repo setting allow_auto_merge (default OFF).
- Symptom: 'GraphQL: Auto merge is not allowed for this repository (enablePullRequestAutoMerge)'.
- Fix: gh api -X PATCH repos/{owner}/{repo} -f allow_auto_merge=true
- Workflow YAML CANNOT enable this — it is a repo-level switch (same structural class as the PR-creation switch in github-actions-token-pr-creation-permission).
LAYER 2 — Merge-method permission.
- Symptom: merge command fails on a repo that disallows the requested method, e.g. --squash on a rebase-only repo.
- Fix: use the method the repo allows. Check: gh api repos/{owner}/{repo} --jq '{allow_squash_merge, allow_rebase_merge, allow_merge_commit}'.
- llamabot fact: rebase-only — never --squash there.
LAYER 3 — Base-branch protection with blocking requirements.
- Symptom: layers 1-2 fixed, yet 'gh pr merge
--auto --rebase' STILL fails: 'Protected branch rules not configured for this branch (enablePullRequestAutoMerge)'. - Root cause: auto-merge DEFERS the merge until blocking requirements (required status checks / reviews) are satisfied. With NO branch protection on the base branch there is nothing to wait for, so GitHub refuses to enable auto-merge at all. (Counterintuitive: protection must be ADDED to get automatic merging.)
- Fix: create a ruleset (or classic branch protection) on main with required status checks. Verify existing state first: gh api repos/{owner}/{repo}/rulesets --jq '.[].name' (empty = none) and gh api repos/{owner}/{repo}/branches/main/protection.
ONE-COMMAND DIAGNOSIS (run before writing any merge flags): gh api repos/{owner}/{repo} --jq '{allow_auto_merge, allow_squash_merge, allow_rebase_merge, allow_merge_commit}'
## Required-Check Selection Rules (Layer 3)
- A required status check that never reports BLOCKS merging forever. Before requiring a check:
- ONLY require checks that run on EVERY PR. Read each workflow's 'on: pull_request:' trigger in the YAML — do not guess from a previous PR's check list. Conditional/filtered jobs are traps:
- WIP bot (marketplace): reports only on WIP/draft PRs — requiring it blocks normal PRs.
- check-changes / path-filtered jobs: may be skipped on unrelated changes.
- '(Dry Run) Publish' steps: may be gated behind label/branch conditions.
- Matrix jobs are required WITH their parameter suffix: 'unit-tests (Python 3.13, pixi)' is a distinct check name from 'unit-tests (Python 3.12, pixi)' — each combination must be listed (or use a check-name that is reported per-matrix and require the pa
Установить github-auto-merge-setup в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл github-auto-merge-setup?
Diagnose and fix 'gh pr merge --auto' failures and set up CI-green auto-merge for GitHub repos/workflows. Use when: 'gh pr merge --auto' or a workflow merge step fails with an enablePullRequestAutoMerge error; auto-merge silently not working; enabling auto-merge for scheduled dependency-update workflows (dependabot etc.); adding a ruleset/branch protection with required status checks and choosing safe required checks; choosing merge flags (--rebase/--squash); a release workflow's push to main rejected with GH013 rule violations; a half-landed release (PyPI/tag published but main never got the 'Bump version' commit, or releases dying at the 'already on PyPI' guard); 'gh pr merge --admin' no-opping while the PR stays BLOCKED under a ruleset (admins are NOT exempt; only bypass_actors); or 'N of M required status checks are expected'. The three-layer gate stack and one-command diagnosis live in the body.
Как установить скилл github-auto-merge-setup?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл github-auto-merge-setup запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic