# Pr Enforcement Action > Nota interna del proyecto no-mistakes. Se usa al cambiar o migrar la action compartida `require-no-mistakes` de enforcement de PR o su workflow llamador. Fuente: https://skillsagentes.com/skills/kunchenguid/no-mistakes/pr-enforcement-action Markdown: https://skillsagentes.com/skills/kunchenguid/no-mistakes/pr-enforcement-action.md Repositorio: https://github.com/kunchenguid/no-mistakes Autor: kunchenguid Licencia: MIT Actualizado: hace 3 días Coste de contexto: 27 tok instalada, 972 tok al activarse, 972 tok con todos los archivos del bundle Bundle: 1 archivo, 4 KB Permisos que pide: ninguno declarado ## Instalación Un skill son archivos markdown: los mismos archivos valen para cualquier agente y lo único que cambia es el directorio de destino, es decir la bandera `--agent`. Añade `-g` para instalarlo en todos los proyectos de la máquina. ```bash # Claude Code npx -y skills add kunchenguid/no-mistakes --skill pr-enforcement-action --agent claude-code # Cursor npx -y skills add kunchenguid/no-mistakes --skill pr-enforcement-action --agent cursor # Codex npx -y skills add kunchenguid/no-mistakes --skill pr-enforcement-action --agent codex # Gemini CLI npx -y skills add kunchenguid/no-mistakes --skill pr-enforcement-action --agent gemini # Windsurf npx -y skills add kunchenguid/no-mistakes --skill pr-enforcement-action --agent windsurf # Cline npx -y skills add kunchenguid/no-mistakes --skill pr-enforcement-action --agent cline ``` ## Qué hace - Nota interna sobre la action compartida de enforcement de PR (`.github/actions/require-no-mistakes`): una composite action que reemplaza scripts copiados y propensos a drift en los repos que la aplican. - Verifica la línea de firma, parsea la attestation v1 de pasos del pipeline, vincula `head_sha` al head del PR y exige que `review`, `test` y `document` estén `completed`. - Los llamadores fijan un tag de release o un SHA de commit, nunca `@main`, que el PR juzgado podría editar; qué pasos son obligatorios no es un input, así que ningún llamador puede debilitar el gate. - El gate propio del repo es un llamador fino fijado a un SHA ya publicado: el PR se testea en su propio head mientras el check obligatorio que lo juzga corre la copia publicada, así que el cambio no puede reescribir a su propio juez. - Un llamador que gana binding de `head_sha` debe quitar `synchronize` de los tipos de `on.pull_request`, salvo donde un ruleset o branch protection REQUIERA el check. ## Cuándo usarla - Se cambia o migra la action compartida `require-no-mistakes` de enforcement de PR o su workflow llamador. ## Qué la activa - "Voy a migrar un repo al action compartido require-no-mistakes" - "Cambia el workflow llamador del gate de PR" - "Revisa el binding de head_sha y los triggers del enforcement" ## Archivos - SKILL.md — 4 KB ## SKILL.md Reproducido tal cual desde kunchenguid/no-mistakes bajo MIT. Esta sección es el documento original y está en inglés. **Shared PR-Enforcement Action (`.github/actions/require-no-mistakes`)** - The shared implementation of the `PR must be raised via no-mistakes` gate is a composite action that lets enforcing repositories replace copied, drift-prone scripts. It verifies the signature line, parses the v1 pipeline-step attestation, binds `head_sha` to the PR head, and requires `review`, `test`, and `document` to be `completed`. 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.md` owns 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 downloads `uses:` 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-tree `verify.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 in `exempt-authors`. An in-job exemption still needs the run to start, and a GITHUB_TOKEN PR's run is created in `action_required` and never starts; the `paths-ignore` entries 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_steps` in `verify.py`), and a skip-shaped sibling field on a `completed` record is deliberately not inspected. Some pre-migration inline gates were stricter (requiring every record of a name to be `completed`); 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. - A caller that gains `head_sha` binding must also drop `synchronize` from `on.pull_request.types`, matching this repository's own post-#773 trigger set. Binding plus `synchronize` pins a stale FAILURE check run to a head the pipeline is about to fix, and `gh pr checks` collapses same-named runs by `startedAt`, so the CI monitor can park the run red forever. That change is only safe where no ruleset or branch protection REQUIRES the check - otherwise a pushed head gets no run and the requirement blocks the merge forever. Verify per repo with `gh api repos///rulesets` plus `.../branches//protection`; at the time of the fleet migration `treehouse`, `sshhip`, and `wheelhouse` required it and therefore keep `synchronize`. - Migrating a repository is rarely a one-file swap. Repos whose tests extract and execute the inline `run:` block (an `extractGateScript()` helper and its gate test) break at import once the block is gone, and repo-level `AGENTS.md` notes 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.go` executes `verify.py` the way a runner does (verdicts, exemption surface, event-payload binding); `workflow_no_mistakes_required_test.go` owns the CALLER - immutable-SHA pin, single delegating step, exemptions, triggers, concurrency identity, fork boundary - and drives the real action through the event payload. ## Dónde encaja - Categoría: [DevOps e infraestructura](https://skillsagentes.com/categorias/devops-infraestructura.md) — Despliegues, contenedores, IaC y flujos de gestión de incidentes. - Creador: [kunchenguid](https://skillsagentes.com/creators/kunchenguid.md) — 16 skills en el directorio - [Todas las skills](https://skillsagentes.com/skills.md) - [Ranking de instalaciones](https://skillsagentes.com/ranking.md) ## Otras skills del mismo repositorio - [No Mistakes](https://skillsagentes.com/skills/kunchenguid/no-mistakes/no-mistakes.md): Valida tus cambios de código por el pipeline de no-mistakes (review de código automatizado, tests, lint, docs, push, PR y CI) antes de que lleguen al destino de push configurado. Se activa con `/no-mistakes`. - [Testing Conventions](https://skillsagentes.com/skills/kunchenguid/no-mistakes/testing-conventions.md): Nota interna del proyecto no-mistakes. Se usa al añadir o cambiar tests, el harness e2e, el aislamiento de procesos de test o el sharding de tests en CI. - [Pr Publication Safety](https://skillsagentes.com/skills/kunchenguid/no-mistakes/pr-publication-safety.md): Nota interna de seguridad del proyecto no-mistakes. Se usa al cambiar el render del cuerpo del PR, la redacción de rutas de home, la publicación de rutas de artefacto o los marcadores de attestation de pipeline. - [Ci Monitor](https://skillsagentes.com/skills/kunchenguid/no-mistakes/ci-monitor.md): Nota interna del proyecto no-mistakes. Se usa al cambiar la readiness de CI, la recogida de checks del forge, los reruns, los timeouts de CI o la monitorización del ciclo de vida del PR. - [Pipeline Review And Agents](https://skillsagentes.com/skills/kunchenguid/no-mistakes/pipeline-review-and-agents.md): Nota interna del proyecto no-mistakes. Se usa al cambiar las sesiones de review, las decisiones sobre findings, los timeouts de agente, el comportamiento del Test local o la conformidad con la intención. ## Skills relacionadas - [Gstack Upgrade](https://skillsagentes.com/skills/garrytan/gstack/gstack-upgrade.md): Actualiza gstack a la última versión. - [Canary](https://skillsagentes.com/skills/garrytan/gstack/canary.md): Monitoreo canary post-deploy: vigila la app en producción tras el despliegue. (gstack) - [X402](https://skillsagentes.com/skills/browser-use/browser-use/x402.md): Configura pagos de Browser Use Cloud con x402: paga por solicitud desde una wallet cripto (USDC en Base mainnet), sin registro ni API key. - [Vercel Deploy](https://skillsagentes.com/skills/bytedance/deer-flow/vercel-deploy.md): Despliega aplicaciones y sitios web en Vercel. Úsala cuando pidan 'despliega mi app', 'llévalo a producción', 'crea un despliegue de vista previa' o 'ponlo en vivo'. No requiere autenticación. - [Dependabot Triager](https://skillsagentes.com/skills/cli/cli/dependabot-triager.md): Evalúa un PR abierto de Dependabot y publica una recomendación (Merge / Review / Do not merge) con nivel de confianza, basada en los cambios reales upstream. Solo asesora, nunca fusiona ni aprueba. --- Skills Agentes · [Índice de páginas en markdown](https://skillsagentes.com/sitemap.md) · [Inicio](https://skillsagentes.com/index.md)