Programatically validate pull requests against the contribution guidelines
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.
- 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
npm install -g gulp jspm
npm install
jspm
install
gulp serve
http://localhost:3003
jspm bundle-sfx --minify pr.js build.min.js
- Comment out the
<!-- dev config -->
block inindex.html
- Uncomment the
<!-- prod config -->
block inindex.html
Test
- Configurable rules
- Load rules configuration from
package.json
- GitHub auth for private projects
- Remote rule loading
- Node server with Build Status API integration