Pull Request Auto Reviewer Private
ActionsThe script works only in private repos. For public ones you should use prator.
Add review comments to your pull requests based on changes in 2 steps:
- Create a file with rules for the action script. (more info):
- prependMsg: "🗯️ [pull-request-auto-reviewer](https://github.com/marketplace/actions/pull-request-auto-reviewer-private):"
- checks:
- paths: "**/*.js"
message: |
### As you changed javascript file(s) tick the following checks:
- [ ] unit/integration tests are added
- [ ] no performance implications
- [ ] relevant documentation is added/updated
- paths: "package-lock.json"
message: |
### Since you've added/updated dependencies, pay attention to this:
- [ ] clear reasoning for adding or updating the dependency is provided
- [ ] no security implications or concerns related to the dependency
- Create a workflow (more info):
name: Auto Review comment
on:
pull_request:
branches:
- main
- master
permissions:
pull-requests: write
contents: read
jobs:
prepare:
name: Auto-review
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 2
- name: Analyze changes
uses: pshergie/prator-private@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
rules-path: path-to-your-rules-file
For this step you need to create a YAML file with the rules that are going to be utilized by the action script. There you need to specify 2 params:
prependMsg
is a message that is prepended to every message of GitHub actions bot. Leave empty if not needed.checks
contains a list ofpaths
andmessage
keys.paths
is dedicated to specify path(s) of changes that would trigger posting of a followedmessage
as a pull request comment. In case of multiplepaths
they should be separated by a comma.message
could be a simple string or markdown. All messages will be combined into a single comment.
In this step create a workflow that uses the action script. pull-requests: write
permission is needed for the GitHub actions bot to be able to post a comment in a PR. contents: read
permission is needed to read the necessary info of your repo. fetch-depth
is needed for a correct work of a diff fetch in the script. It's also important to provide 2 params that are being consumed by the action script:
token
: your GitHub tokenrules-path
: a path to the file with rules that you have specified earlier (for instance.github/auto-review-rules.yml
)
Pull Request Auto Reviewer Private is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.