Repolode
danger

danger/danger-js

Danger JS runs after your CI to automate code review conventions, such as enforcing changelogs or PR description rules, in pull requests.

Stars
5,519
Forks
386
Open issues
171
Last commit
12 days ago

What is it?

Danger JS is a tool that runs after your continuous integration jobs and checks pull requests or merge requests against rules your team defines. Instead of reviewers repeatedly pointing out missing changelog entries, unlinked tickets, or unlabeled PRs, the rules run automatically and can post warnings, failures, or messages on the review.

Rules are written in JavaScript or TypeScript and use a DSL that exposes metadata about the pull request, such as changed files, body text, and labels. Danger works with GitHub, Bitbucket Server, and Bitbucket Cloud for code review, and integrates with many CI systems including GitHub Actions, GitLab CI, Circle CI, Travis CI, and Jenkins.

Shared checks can be packaged as plugins, so teams can reuse common rules instead of writing each one from scratch.

Key features

  • 01Runs custom review rules written in JavaScript or TypeScript after CI.
  • 02Reads pull request metadata such as changed files, body text, and labels.
  • 03Posts warnings, failures, or messages directly on pull requests.
  • 04Supports GitHub, Bitbucket Server, and Bitbucket Cloud.
  • 05Integrates with many CI systems including GitHub Actions, GitLab CI, and Jenkins.
  • 06Allows shared rules to be distributed as plugins.

Use cases

  • Requiring a CHANGELOG entry when source files change.
  • Enforcing links to Trello or JIRA tickets in PR descriptions.
  • Warning reviewers when sensitive files or configuration are modified.
  • Requiring descriptive labels on merge requests.

Quick start

  1. 1

    Clone the repository

    git clone https://github.com/danger/danger-js.git
  2. 2

    Enter the project directory

    cd danger-js
  3. 3

    Install yarn if you don't have it

    npm install -g yarn
  4. 4

    Install project dependencies

    yarn install

In collections

Topics

FAQ

What is danger-js?
Danger JS runs after your CI to automate code review conventions, such as enforcing changelogs or PR description rules, in pull requests. Danger JS is a tool that runs after your continuous integration jobs and checks pull requests or merge requests against rules your team defines. Instead of reviewers repeatedly pointing out missing changelog entries, unlinked tickets, or unlabeled PRs, the rules run automatically and can post warnings, failures, or messages on the review.
Is danger-js free to use? What license does it have?
danger-js is open source under the MIT license. Check the license terms before using it in commercial products.
Is danger-js still maintained?
Actively maintained. The last commit to danger-js was on Oct 26, 2026.
What can I use danger-js for?
Requiring a CHANGELOG entry when source files change. Enforcing links to Trello or JIRA tickets in PR descriptions. Warning reviewers when sensitive files or configuration are modified. Requiring descriptive labels on merge requests.
How do I install danger-js?
Clone the repository: git clone https://github.com/danger/danger-js.git Enter the project directory: cd danger-js Install yarn if you don't have it: npm install -g yarn Install project dependencies: yarn install
Where can I get danger-js?
The source code and installation instructions are on GitHub: https://github.com/danger/danger-js

Summary generated by AI from the project's README. GitHub stats refresh daily.

Related projects