Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/omio-labs/pr-reviewer-bot
A friendly bot that approves certain GitHub PRs automatically
https://github.com/omio-labs/pr-reviewer-bot
Last synced: 3 months ago
JSON representation
A friendly bot that approves certain GitHub PRs automatically
- Host: GitHub
- URL: https://github.com/omio-labs/pr-reviewer-bot
- Owner: omio-labs
- License: mit
- Created: 2020-01-07T14:06:17.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2023-01-05T04:57:30.000Z (almost 2 years ago)
- Last Synced: 2024-07-12T06:20:56.184Z (4 months ago)
- Language: TypeScript
- Homepage:
- Size: 4.1 MB
- Stars: 15
- Watchers: 1
- Forks: 2
- Open Issues: 24
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.md
- Code of conduct: CODE_OF_CONDUCT.md
- Codeowners: CODEOWNERS
Awesome Lists containing this project
README
# Auto Pull Request Review Bot/Action
`pr-reviewer-bot` reviews your pull requests based on the criteria you set and approves them automatically.
## How to Use
The ideal way to run this bot is to do it as a pull request checker. You can do so by running it as a Github Action. You will then need to write a configuration file define the rules of PR approval for the bot.
### Quick Access
- [Run the bot as a Github Action](#user-content-running)
- [Configure the bot](docs/configuration.md)
- [Frequently asked questions](docs/faq)
- [Contributing](CONTRIBUTING.md)## Running As a Github Action
Running the bot as a Github Action is quite straight forward. We'll do it in 3 quick steps:
#### Obtaining a Github Token
The only parameter the bot needs is a `GITHUB_TOKEN` to be used when posting a review to the pull request. Github Actions adds a default token in to your project's secrets without you doing anything. However, this token does not have permission to post reviews for PRs. Because of that, we'll need to create a new token to be used here. You can find an official guide for that [here](https://help.github.com/en/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line).
#### Add the Token to the Secrets of Your Repository
After we obtain a personal token, you need to add this token to `secrets` section of your repository. In your repository view, go to `Settings` > `Secrets` and add the token with a name like `GH_TOKEN` or any name of your choice.
#### Create a Github Workflow
Now we just create a new file under `.github/workflows` to tell Github to run this script whenever there is a new pull request. Let's say the file name is `auto-pr-review.yml`. Then the file would look like below:
```yml
name: Auto PR Reviewon: [pull_request]
jobs:
test:
runs-on: ubuntu-lateststeps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
- uses: omio-labs/pr-reviewer-bot@v1
with:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
```This will create a checker on your pull requests and run the bot. You can view this checker on your pull requests.
![auto-pr-review-checker](/docs/img/auto-pr-review-action.png)
# FAQ
Please refer to [FAQ](docs/faq.md).
# Contributing
Please refer to the [contribution guide](CONTRIBUTING.md).