https://github.com/enkidevs/approve-ci
:+1: Monitor pull requests and check for approval
https://github.com/enkidevs/approve-ci
bot continuous-integration github
Last synced: 9 months ago
JSON representation
:+1: Monitor pull requests and check for approval
- Host: GitHub
- URL: https://github.com/enkidevs/approve-ci
- Owner: enkidevs
- Created: 2016-04-20T10:00:50.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2017-05-18T05:06:16.000Z (about 9 years ago)
- Last Synced: 2025-09-08T16:40:44.634Z (9 months ago)
- Topics: bot, continuous-integration, github
- Language: JavaScript
- Homepage:
- Size: 64.5 KB
- Stars: 35
- Watchers: 7
- Forks: 2
- Open Issues: 28
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# approve-ci
[](https://travis-ci.org/enkidevs/approve-ci)
[](http://approve-ci.herokuapp.com/)
Approve-ci monitors pull requests and checks for approval. Once the number of approvals exceeds the number of disapprovals by a set amount the pull request is marked as 'approved' and is ready to merge.

## How To Use?
- Go to
- your project on GitHub > Settings > Webhooks & services > Add Webhook or
- your organization on GitHub > Settings > Webhooks > Add Webhook
- Payload URL: (https://approve-ci.herokuapp.com/)
- Let me select individual events > Check `repo`
- Add Webhook
And you are done. Next time a pull request is opened, you should see the pending status from approve-ci ;)
## Configuration
The bot can be configured by adding a `.approve-ci` file to the base directory of the repo. Here's a list of the possible options:
```
{
"name": "approve-ci",
"approvalCount": 1,
"approvalStrings": ["%F0%9F%91%8D", ":+1:", ":thumbsup:"],
"disapprovalStrings": ["%F0%9F%91%8E", ":-1:", ":thumbsdown:"],
"approveString": "The pull request was approved",
"rejectString": "The pull request needs more work",
"pendingString": "Waiting for approval"
}
```
When using emojis you must [URI encodeURI](http://pressbin.com/tools/urlencode_urldecode/) them (as shown above for :thumbsup: and :thumbsdown:).
## Protected branches
GitHub allows you protect branches and to require specific tests to pass before pull requests can be merged. You can set this up by visiting [https://github.com/USERNAME/REPO/settings/branches](https://github.com/USERNAME/REPO/settings/branches), selecting the branch you want to protect and then checking the approve-ci bot (the name is defined in the configuration file, see the next section), approval is needed before a request can be merged.
[](https://github.com/enkidevs/approve-ci/settings/branches)
## How To Contribute or Run Your Own Bot?
If you want to use a different account for the bot, change the message or extend it to provide additional functionality, we've tried to make it super easy:
```bash
git clone https://github.com/enkidevs/approve-ci.git
cd approve-ci
npm install
npm start
# Follow the instructions there
```
Alternatively you can deploy the bot using Heroku by pressing the button below:
[](https://heroku.com/deploy)
Or you can build and deploy on your servers using Docker:
```bash
docker build -t approve-ci .
docker run -d -p 80:3000 -e GITHUB_TOKEN= approve-ci
```
## License
MIT