webispy / checkpatch-action

Github action for checkpatch.pl
7 stars 6 forks source link

Add note on `GITHUB_TOKEN` usage #10

Closed gschwaer closed 2 years ago

gschwaer commented 2 years ago

Hi, I just had this problem and it took me a while to figure out what was wrong with my setup. I think it would be a good hint to others: When using this action with a private repository they need to pass the GITHUB_TOKEN to the action.

When not giving the action access to the token, it fails silently:

Review PR with comments.
Get the list of commits included in the PR(refs/pull/1/merge).
 - API endpoint: https://api.github.com/repos/gschwaer/checkpatch-action-test/pulls/1/commits
jq: error (at <stdin>:4): Cannot index string with string "sha"
 - Commits 1: 
Start review for each commits.
Done

It'll show as successful job completion.

gschwaer commented 2 years ago

Done. Thanks for considering this change. :+1: