pr-enforcement-action
БесплатноБез исполняемых скриптовНе проверенUse when changing or migrating the shared require-no-mistakes PR-enforcement action, its live PR lookup, or its workflow caller.
от kunchenguid★ 9 314 звёзд на GitHubОб этом скилле
Shared PR-Enforcement Action (.github/actions/require-no-mistakes)
- The shared implementation of the
PR must be raised via no-mistakesgate is a composite action that lets enforcing repositories replace copied, drift-prone scripts. It verifies the signature line, parses the v1 pipeline-step attestation, bindshead_shato the PR head, and requiresreview,test, anddocumentto becompleted. Callers pin a release tag or commit SHA, never@main, which the judged PR can edit. Per-repo configuration is exemptions only (exempt-authors,exempt-bot-authors,exempt-head-branches); which steps are required is deliberately not an input, so no caller can weaken the gate while still reporting the same check name. The action README owns usage;CONTRIBUTING.mdowns the contributor-facing contract. - This repository's own gate (
.github/workflows/no-mistakes-required.yml) is a thin caller of the action, pinned at an already-published commit SHA. GitHub downloadsuses:at job setup, so the pin must always name a ref that already carries the action. That pin IS the self-certification guard: a PR editing the action is fully tested on its own head (the Go tests execute the working-treeverify.py) while the required check judging it runs the published pinned copy, so the change cannot rewrite its own judge. Bumping the pin is a separate deliberate PR. - This repo's automation exemptions stay in the job-level
if:, not inexempt-authors. An in-job exemption still needs the run to start, and a GITHUB_TOKEN PR's run is created inaction_requiredand never starts; thepaths-ignoreentries exist for the same reason. Repos without that constraint should prefer the action's inputs. - Duplicate step records are LAST-WINS by design (
check_required_stepsinverify.py), and a skip-shaped sibling field on acompletedrecord is deliberately not inspected. Some pre-migration inline gates were stricter (requiring every record of a name to becompleted); that strictness is explicitly NOT the standard, and relaxing to last-wins on migration is the intended outcome, not a regression. Do not "harden" this without an owner decision. - All callers use the T2 trigger set (
opened,edited,synchronize,reopened). Since the pre-push attestation change (#994),synchronizeis the event that judges a pipeline-pushed head, so it is restored rather than dropped afterhead_shabinding. - Migrating a repository is rarely a one-file swap. Repos whose tests extract and execute the inline
run:block (anextractGateScript()helper and its gate test) break at import once the block is gone, and repo-levelAGENTS.mdnotes that tell agents to hand-copy the gate from a sibling repository must be rewritten - that copying is the drift the shared action exists to remove. - Regressions:
require_no_mistakes_action_test.goexecutesverify.pythe way a runner does (verdicts, exemption surface, event-payload binding);workflow_no_mistakes_required_test.goowns the CALLER - immutable-SHA pin, single delegating step, exemptions, triggers, concurrency identity, fork boundary - and drives the real action through the event payload.
Stale Actions Event Replay Can Resurrect a Superseded Check (require-no-mistakes)
.github/actions/require-no-mistakes/verify.pyreads the PR body/head SHA it verifies from a live GitHub REST API lookup first (vialive_pr_facts, a directurllib.requestGET to{GITHUB_API_URL}/repos/{repo}/pulls/{number}with the forwardedgithub-tokenas a Bearer token, noghCLI), not fromGITHUB_EVENT_PATH, whenever a caller forwards no explicitpr-body/pr-head-sha(the documented zero-input integration every caller actually uses). A GitHub Actions job rerun replays the event payload archived at the run's original trigger rather than delivering a fresh one; re-running an old, already-superseded failed run therefore used to reproduce its stale verdict with a brand-new check-run timestamp, which both GitHub's own required-check view andcollapseLatestByName(internal/scm/github/github.go) treat as current - pinning a stale FAILURE next to an already-green commit with no clean recovery short of a new SHA. When a required live lookup is unavailable (nopull-requests: read, no token, or the API call fails), the gate fails closed rather than certifying compliance from the possibly-stale event payload; explicitpr-body/pr-head-shainputs always skip the live lookup and win, unchanged.- Tests:
require_no_mistakes_action_test.go(TestRequireActionLiveLookupOverridesStaleArchivedEventand siblings).
Установить pr-enforcement-action в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл pr-enforcement-action?
Use when changing or migrating the shared require-no-mistakes PR-enforcement action, its live PR lookup, or its workflow caller.
Как установить скилл pr-enforcement-action?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл pr-enforcement-action запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic