-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No report on pull requests from forks #2
Comments
I edited the code so that this action won't fail anymore on this error. |
Any chance the report could be printed directly to the standard ouptut in that case? Otherwise, if there's a failure later in the pipeline (e.g. our CI fails if the score decreases) we can't see what's wrong. |
Hello @vaind, you can still see the original raw JSON report in the logs, along with the values of the outputs. Is this what you want? |
Totally missed that, all good then |
For cases like this, is there any way the raw json from the job logs can be captured and turned into a report or downloadable job artifact? Having to hunt through the logs to see the analysis in these cases is a bit tedious. |
Hi @GroovinChip, could you please create a separate issue for this ? :) |
Done |
Description
When the action is triggered by the
pull_request
event, if the pull request is from a different repository (a fork), the action fails with the error "Resource not accessible by integration".EDIT: this behavior has changed. See the comment below.
Why is this happening
This action uses the
GITHUB_TOKEN
you provide to call the GitHub API and to post the result of its analysis.As explained here, here, or here, GitHub for now reduces the permissions of this token when the action is triggered by another repository.
Therefore an error is thrown when this action tries to call the API in this situation.
Current workaround
A possible workaround is to edit your workflow to trigger this action only when pull requests come from the same repository. This can be done by adding an if-condition, as illustrated below:
I will update this issue if there is new information on this.
The text was updated successfully, but these errors were encountered: