This GitHub Action automatically requests reviews on pull requests based on changed files.
It does this by checking the teammates with commits on those changed files and adding them as reviewers to pull requests. This means you do not need to manually provide a list of reviewers for this action.
Required The GitHub token to use for authentication. Typically, this should be set to ${{ secrets.GITHUB_TOKEN }}
.
Optional The maximum number of reviewers to be added to the pull request. Defaults to 2.
-
Create a Workflow YAML File: In your repository, create or edit a workflow YAML file (e.g.,
.github/workflows/main.yml
). -
Define the Workflow:
name: main
on:
pull_request:
types: [opened]
defaults:
run:
shell: 'bash'
jobs:
request-reviews:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
# Note: this is required for the action to work
fetch-depth: 0
- name: Auto PR review requests
uses: UcheSylvester/pr-smartrr@v0.1.0
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
max-reviewers: 2
To run this action locally, you need to have Node.js installed on your machine.
- Clone this repository:
git clone
- Install dependencies:
yarn
- Build the typescript:
yarn build
- Run the tests:
yarn test
- Run the local action with nektos/act:
act -j pr-labelr -s GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}
We welcome contributions from the community to make Pr Smartrr even better. Whether it's bug fixes, new features, or improvements to documentation, your input is valuable. To contribute, follow these steps:
- Create an issue describing the feature/bug you want to work on.
- Fork the repository on GitHub.
- Create a new branch for your changes.
- Make your changes and commit them with descriptive messages.
- Submit a pull request to the main repository.
This project is licensed under the MIT License - see the LICENSE file for details.
Email | Follow on Twitter | Connect on LinkedIn | Report an Issue