This GitHub action post comments based on pull request changes.
RequestError [HttpError]: Resource not accessible by integration
. The permission can be granted in the yaml config or in the repository settings: Settings
-> Actions
-> General
-> Workflow permissions
This action receives 2 required params:
token
: your GitHub tokendatapath
: a path to a yaml file with a config that containsprependMsg
andchecks
props.prependMsg
is a message that prepends to every message of the bot. Keep empty if not needed. By default it's🗯️ [pull-request-auto-reviewer]:
(as per screenshot).checks
props consists of pairs ofpaths
andmessage
keys.paths
dedicated to specify path(s) of changes that would trigger posting of followedmessage
as a pull request comment. In case of multiplepaths
they should be separated by a comma.message
could be a simple string or a markdown. Example
A typical setting may look like this:
on:
pull_request:
branches:
- main
jobs:
review:
name: Post review comments
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: pull-request-auto-reviewer
uses: pshergie/pull-request-auto-reviewer@1.4
with:
token: ${{ secrets.GITHUB_TOKEN }}
datapath: docs/data.yml