Skip to content

Add note on GITHUB_TOKEN usage#10

Merged
webispy merged 1 commit intowebispy:masterfrom
gschwaer:docs/token-usage-for-private-repos
Jul 19, 2022
Merged

Add note on GITHUB_TOKEN usage#10
webispy merged 1 commit intowebispy:masterfrom
gschwaer:docs/token-usage-for-private-repos

Conversation

@gschwaer
Copy link
Copy Markdown
Contributor

@gschwaer gschwaer commented Jul 18, 2022

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 gschwaer force-pushed the docs/token-usage-for-private-repos branch 3 times, most recently from 89023aa to 918e0f0 Compare July 18, 2022 11:48
Copy link
Copy Markdown
Owner

@webispy webispy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the pull request!
Please add Signed-off-by: ... to your commit message.
FYI, $ git commit -s --amend

@webispy webispy self-requested a review July 19, 2022 05:51
This action needs access to the `GITHUB_TOKEN` if used with a private
repository.

Signed-off-by: Gero Schwäricke <gero.schwaericke@grandcentrix.net>
@gschwaer gschwaer force-pushed the docs/token-usage-for-private-repos branch from 918e0f0 to 72567aa Compare July 19, 2022 11:49
@gschwaer
Copy link
Copy Markdown
Contributor Author

Done. Thanks for considering this change. 👍

@webispy webispy merged commit ea4d252 into webispy:master Jul 19, 2022
@gschwaer gschwaer deleted the docs/token-usage-for-private-repos branch July 20, 2022 13:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants