https://github.com/adbayb/github-bot-prmanager
⚙️ A PR bot manager (labels...)
https://github.com/adbayb/github-bot-prmanager
github tool
Last synced: 10 months ago
JSON representation
⚙️ A PR bot manager (labels...)
- Host: GitHub
- URL: https://github.com/adbayb/github-bot-prmanager
- Owner: adbayb
- License: mit
- Created: 2017-11-04T20:22:15.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2024-01-15T02:46:10.000Z (almost 2 years ago)
- Last Synced: 2025-01-05T05:42:05.518Z (12 months ago)
- Topics: github, tool
- Language: JavaScript
- Homepage:
- Size: 77.1 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# github-bot-prmanager
## Why ?
This bot allows to manage more efficiently your github pull requests by setting a set of automatic behaviors.
These behaviors are defined thanks to a plugin system.
Basically, `github-bot-prmanager` listens to github bot events and responds by a set of actions that can be defined via those plugins.
## Installation
**Manual:**
* [x] Clone the repository: `git clone https://github.com/adbayb/github-bot-prmanager.git`
* [x] `cd github-bot-prmanager`
* [x] Creates a `.env` file by following the `.env.example` template to add your github user token (which will act as a user bot)/configure the bot. _Please, note:_ `repo token scope` is the minimal rights requirements to give to the user bot.
* [x] `npm install`
* [x] `npm start`
* [x] You're all done, the bot is now lauched and listens to port 3000.
* [x] You can now enable your bot into your github repository by adding your bot server as a github webhook (@see [Github documentation: Setting up a Webhook](https://developer.github.com/webhooks/creating/#setting-up-a-webhook)).
**Docker:**
* [x] Clone the repository: `git clone https://github.com/adbayb/github-bot-prmanager.git`
* [x] `cd github-bot-prmanager`
* [x] Creates a `.env` file by following the `.env.example` template to add your github user token (which will act as a user bot)/configure the bot. _Please, note:_ `repo token scope` is the minimal rights requirements to give to the user bot.
* [x] `docker build -t github/bot .`
* [x] `docker run -p 3000:3000 github/bot`
* [x] You're all done, the bot is now lauched and listens to port 3000.
* [x] You can now enable your bot into your github repository by adding your bot server as a github webhook (@see [Github documentation: Setting up a Webhook](https://developer.github.com/webhooks/creating/#setting-up-a-webhook)).
## List of plugins
**Related to label management:**
* [x] **[Approval](./src/plugins/approvedLabel.js)**: For each review, it checks if the targetted lowest required approval is reached. If yes, it adds the label `LGTM` to the PR.
* [x] **[Title](./src/plugins/titleLabel.js)**: For each created pull request, it checks the title format and extracts the scope from it. Basically, a pull request must follow the angular commit message convention ([Angular's commit convention](https://github.com/angular/angular.js/blob/master/DEVELOPERS.md#-git-commit-guidelines): `(): `) to be trated by this plugin. It will extract the scope and add associated label to the pull request (creates one if not).