Danger logo

Danger

Automate pull‑request checks and enforce team code‑review standards.

Danger runs in CI to lint pull requests, enforcing changelogs, issue links, labels, and custom rules, letting teams codify review norms while focusing on complex problems.

Danger banner

Overview

Overview

Danger integrates into your CI pipeline to automate repetitive pull‑request checks. By providing a DSL for defining rules, it lets teams codify standards such as mandatory CHANGELOG entries, required JIRA/Trello links, and descriptive labels.

Capabilities

During each build, Danger evaluates the PR against configured rules, posting feedback directly in the review thread. Its plugin architecture enables sharing common checks across projects and extending functionality with custom scripts tailored to a team's culture.

Deployment & Community

Install the Ruby gem, add a Dangerfile to your repository, and run it via GitHub Actions, CircleCI, GitLab CI, or any environment that can execute Ruby. Backed by an active community, the project offers extensive documentation, plugins, and MIT‑licensed source code.

Highlights

Enforce changelog presence and format
Validate PR description contains JIRA/Trello links
Require descriptive labels and detect anti‑patterns
Extensible plugin ecosystem for custom team rules

Pros

  • Provides immediate, automated feedback in pull requests
  • Centralizes review policies across repositories
  • Large community with many ready‑made plugins
  • Runs in any CI that can execute Ruby scripts

Considerations

  • Requires a Ruby runtime to operate
  • Complex rule sets can become hard to maintain
  • Limited native support for non‑Ruby projects without wrappers
  • Debugging may need Ruby‑specific knowledge

Managed products teams compare with

When teams consider Danger, these hosted platforms usually appear on the same shortlist.

Codacy logo

Codacy

Static analysis and quality gates for engineering teams.

CodeAnt AI logo

CodeAnt AI

AI code review and security platform with one-click fixes.

CodeRabbit logo

CodeRabbit

AI code review and PR assistant for automated feedback

Looking for a hosted option? These are the services engineering teams benchmark against before choosing open source.

Fit guide

Great for

  • Teams that want to codify code‑review standards
  • Projects using CI pipelines capable of running Ruby
  • Organizations seeking automated PR linting for changelogs, issue links, and labels
  • Open‑source maintainers wanting to share review plugins

Not ideal when

  • Environments without Ruby installed
  • Very small projects where manual review is sufficient
  • Teams preferring GUI‑only review tools
  • Projects requiring out‑of‑the‑box support for languages without Ruby integration

How teams use it

Changelog enforcement

Pull requests missing a properly formatted CHANGELOG are flagged, ensuring release notes stay up‑to‑date.

Issue link verification

PR bodies lacking JIRA or Trello URLs are rejected, keeping work tracking consistent.

Label compliance

Missing or incorrect labels trigger warnings, helping triage and release processes.

Custom anti‑pattern detection

Team‑specific scripts catch discouraged code patterns early, reducing technical debt.

Tech snapshot

Ruby99%
HTML1%
Dockerfile1%
Shell1%

Tags

dangerbitbucketautomationgithubcode-reviewcircletravisgitlabci

Frequently asked questions

Do I need to write rules in Ruby?

Rules are expressed in a Ruby‑based DSL, but you can call any language or tool from within the Dangerfile.

Can Danger be used with GitHub Actions?

Yes, a pre‑built action is available that runs Danger as part of a workflow.

How does Danger integrate with other CI services?

Any CI that can execute a Ruby script can run Danger; examples include CircleCI, GitLab CI, Travis CI, and Jenkins.

Is there a way to share rules across repositories?

You can publish shared plugins or import a common Dangerfile from a central location.

What license does Danger use?

Danger is released under the MIT license.

Project at a glance

Active
Stars
5,635
Watchers
5,635
Forks
491
LicenseMIT
Repo age10 years old
Last commit3 weeks ago
Primary languageRuby

Last synced 12 hours ago