Feature: Improve error message when branch protection check fails because of the use of GITHUB_TOKEN #2946
Labels
check/Branch-Protection
good first issue
Good for newcomers
kind/docs
Improvements or additions to documentation
kind/enhancement
New feature or request
Stale
Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
When the scorecard GitHub action is used for evaluation, the default GitHub Actions token lacks the necessary permissions to perform the branch protection check, resulting in the following generic access issue error:
"Reasoning: internal error: error during brancheshandler.setup: internal error: githubv4.query: resource not accessible by integration"
Often times maintainers fail to understand the error message and end up ignoring the check all together.
Describe the solution you'd like
A clear and concise description of what you want to happen.
We can check if the branch protection check fails because of the use of GITHUB_TOKEN and provide a more helpful error message.
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.
For example, NodeJS is using the Scorecard action to calculate their Scorecard scores which returns this generic error messsage:
https://kooltheba.github.io/openssf-scorecard-api-visualizer/#/projects/github.com/nodejs/node
"Reasoning: internal error: error during brancheshandler.setup: internal error: githubv4.query: resource not accessible by integration"
The text was updated successfully, but these errors were encountered: