Skip to content

radify/PR.js

Repository files navigation

PR.js

Programatically validate pull requests against the contribution guidelines


Why?

Most projects have rules of some kind about how to submit pull requests, which often include things like commit message formatting, squashing commits, etc. PR.js allows you to implement these rules as simple ES6 classes, using the GitHub API to check against open pull requests.

Screenshots

Prior Art

  • GitCop: Closed source, only validates commit messages based on a limited rule set
  • Commitizen: Open source, validates commit messages at commit time using a limited rule set, requires local install, requires committer and repo opt-in, not PRs.
  • Rolling your own: more flexibility; more work; access to local system; requires local installation; for commits, not PRs

Get Going

Going to Production

  • jspm bundle-sfx --minify pr.js build.min.js
  • Comment out the <!-- dev config --> block in index.html
  • Uncomment the <!-- prod config --> block in index.html

Test

Roadmap

  • Configurable rules
  • Load rules configuration from package.json
  • GitHub auth for private projects
  • Remote rule loading
  • Node server with Build Status API integration