oss-bot-js is a bot for managing PR reviews on OSS GitHub repositories.
Are you maintaining an OSS project and want contributors to follow certain conventions for pull requests? oss-bot saves you valuable time by automating convention checks, reminding contributors when they (unwittingly) violate your project's conventions.
oss-bot-js is the Node.js version of oss-bot.
oss-bot can currently:
- Check PR titles
- Check PR descriptions
- Comment on non-conforming PRs
- You will need a Heroku account for this.
Cheat: If your project follows these conventions, skip to the next section and simply set your GitHub webhook to
https://oss-bot-js.herokuapp.com/pull_req
. This bot also enforces the convention that the PR description contains<GitHub-keyword> #<issue-number>
.
- Fork/clone this repository.
- Create a new GitHub user account for your bot, e.g.
teammates-bot
. - Create an API access token in this new GitHub account under
Settings -> Personal access tokens
. - Create a new Heroku app.
- In the Heroku app settings, click
Reveal Config Vars
. Add the following keys:
GITHUB_API_TOKEN : Your bot's GitHub API access token
CONTRIBUTING_GUIDELINES : Your project's contributing guidelines
REGEX_PULL_REQ_TITLE : Javascript regex to validate the PR title
REGEX_PULL_REQ_BODY : Javascript regex to validate the PR description
ENABLE_KEYWORD_CHECKER (optional variable) : Set value to `TRUE` to enable GitHub keyword checking
- Deploy the bot to Heroku.
- Go the
Settings -> Webhooks
in your GitHub repo. - Add webhook.
- Set your
payload URL
tohttps://<appname>.herokuapp.com/pull_req
. - Set
content type
toapplication/json
. - Choose
Let me select individual events -> Pull request
. - Add Webhook.
oss-bot-js welcomes contributors! If you have a feature to suggest or would like to contribute code/tests, please create a new issue in the issue tracker! This project has been adopted by the TEAMMATES organization and is being further developed here.