reviewdog / action-stylelint

Run stylelint with reviewdog
https://github.com/marketplace?type=actions&query=reviewdog
MIT License
46 stars 24 forks source link

Failed to parse stylelint diff due to 401 (unauthorized) #62

Open geebru opened 2 years ago

geebru commented 2 years ago

We currently run a custom stylelint and eslint setup and I'm looking into a reviewdog replacement to surface errors as PR comments. Github claims that API will come more easily at some point, but until then, plugins I seek.

I have the token all setup (as without the Github token, I expectantly get "no token provided" errors) but once the token is added, and reviewdog-stylelint runs I get this:

Github workflow error showing "reviewdog: post failed for stylelint: fail to parse diff: GET (PR API url): 401 Bad credentials []"

I'm a touch lost here as to what besides the token reviewdog might be hitting authentication problems with. Any help here would be appreciated!

bert-mccutchen commented 7 months ago

This sounds like a GitHub Actions token permissions issue. Here is a link to their documentation for fine-tuning permissions at a per-job level: https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs

[!NOTE] By default, the GitHub Actions token provides read-only access.