action-eslint
action-eslint copied to clipboard
HttpError: Resource not accessible by integration
An HttpError occurred when a PR was submitted. It did not cause the check to fail because it was an uncaught exception.
![Screen Shot 2019-11-25 at 9 20 55 AM](https://user-images.githubusercontent.com/750276/69558181-04828e80-0f65-11ea-94d3-e57446ec377b.png)
See: https://github.com/cybersemics/em/pull/177/checks?check_run_id=319316407
Here is where it errors:
try {
const { conclusion, output } = await eslint_cli_1.eslint(filesToLint);
await octokit.checks.update({
...context.repo,
check_run_id: checkId,
completed_at: new Date().toISOString(),
conclusion,
output
});
if (conclusion === 'failure') {
core.setFailed(`ESLint found some errors`);
}
}
catch (error) {
await octokit.checks.update({
...context.repo,
check_run_id: checkId,
conclusion: 'failure',
completed_at: new Date().toISOString()
});
core.setFailed(error.message);
}
https://github.com/tinovyatkin/action-eslint/blob/master/lib/main.js#L92
Presumably this should catch the error and fail the action, so I am not sure how the action is completing successfully.
It looks like an octokit authentication error of some kind, perhaps similar to this: https://github.community/t5/GitHub-API-Development-and/Resource-not-accessible-by-integration-when-requesting-GitHub/td-p/13829
I believe I have the repo-token set correctly in my workflow config.
(unintentional close)
This actually seems like what is happening. It does not have write permission on forks: https://github.com/actions/labeler/issues/12#issuecomment-549901347
So, what is your preferred behavior in this case - shallow errors on not being able to do annotations?
Yes, if I am understanding what you mean by shallow errors. I think until there is a better workaround for the permissions issue, the action should fail if there is an error. I will keep an eye out for forthcoming solution from the mentioned issue.
Has anyone gotten this action to work when non-owners submit a pull request? I'm still having the same issue: https://github.com/cybersemics/em/pull/242/checks.