action-eslint
action-eslint copied to clipboard
reviewdog: This GitHub token doesn't have write permission of Review API [1]
So I'm following the example provided and everything is working except for the given error above...
eslint:
name: eslint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: reviewdog/action-eslint@v1
with:
reporter: github-check
eslint_flags: "src/"
Adding
github_token: ${{ secrets.GITHUB_TOKEN }}
does nothing
Adding a permission block helped to run reviewdog as expected. Tested with eslint 7 & 8.
eslint:
name: eslint
runs-on: ubuntu-latest
+ permissions:
+ contents: read
+ pull-requests: write
steps:
- uses: actions/checkout@v2
- uses: reviewdog/action-eslint@v1
with:
+ github_token: ${{ secrets.GITHUB_TOKEN }}
reporter: github-check
eslint_flags: "src/"
I don't have a open PR to test this.
But assuming this works that's a great fix, thanks, I might create a test repo to verify this fix.
Regardless this info should be added to this repositories readme.