Esta página se muestra en inglés. Una traducción al español está en curso.
SkillsMay 12, 2026·2 min de lectura

Danger — Automate PR Review Rules in CI

Danger runs scripted PR checks and posts review comments, turning team style rules into repeatable CI feedback instead of manual nitpicks.

Listo para agents

Staging seguro para este activo

Este activo primero queda en staging. El prompt copiado pide inspeccionar los archivos staged antes de activar scripts, config MCP o config global.

Stage only · 29/100Política: staging
Superficie agent
Cualquier agent MCP/CLI
Tipo
Skill
Instalación
Stage only
Confianza
Confianza: Established
Entrada
Asset
Comando de staging seguro
npx -y tokrepo@latest install b32230ce-23a6-47cb-a4d8-2739397ff1c7 --target codex

Primero deja archivos en staging; la activación requiere revisar el README y el plan staged.

Introducción

Danger runs scripted PR checks and posts review comments, turning team style rules into repeatable CI feedback instead of manual nitpicks.

  • Best for: teams who want consistent PR hygiene (changelog, labels, links) enforced automatically
  • Works with: GitHub/GitLab PR pipelines, Ruby + Bundler, a CI token (e.g. GitHub API token)
  • Setup time: 20–40 minutes

Practical Notes

  • Quant: start with 1–3 rules and expand after a week of signal/noise review.
  • Quant: use --verbose for the first 3 CI runs to diagnose token/PR context issues.

Pattern: make PR policy explicit (and reviewable)

Treat your Dangerfile like any other engineering policy:

  • keep the first sentence of each message actionable (what to change),
  • link to the team standard (CONTRIBUTING / style guide),
  • and version it with code review.

Pattern: split “hard fail” vs “soft warn”

Start with warnings (comments) to build trust, then promote the most stable checks into strict merge gates.

Troubleshooting checklist

  • Confirm the CI job runs only on PRs/MRs.
  • Confirm the correct token env var exists in that job.
  • Run bundle exec danger --verbose locally (in a PR checkout) to reproduce.

FAQ

Q: Is Danger free? A: Yes. It’s open-source under the MIT license; you host and run it in your own CI.

Q: Do I need Ruby in my repo? A: Typically yes. Most teams run Danger via Bundler so versions are pinned per repo.

Q: How do I keep it from being noisy? A: Start with a few high-signal checks, and distinguish warnings from failures.

🙏

Fuente y agradecimientos

Source: https://github.com/danger/danger > License: MIT > GitHub stars: 5,666 · forks: 488

Discusión

Inicia sesión para unirte a la discusión.
Aún no hay comentarios. Sé el primero en compartir tus ideas.

Activos relacionados