-
Notifications
You must be signed in to change notification settings - Fork 15
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
Give a better error than "Resource not accessible by integration" when permissions lacking #368
Comments
Since we have almost no error handling other than one big try/catch block, I'd suggest a solution where each octokit call has its own error handling, so we can do more helpful suggestions. I've been writing in Golang primarily at work lately (handle ALL the errors), so I'm looking at this code like "who wrote this?". Perhaps there's a different route where https://github.com/actions/core or similar offers a way to verify the workflow is getting the permissions it asked for 🤷 EDIT: and yes @JoshuaKGoldberg we could totally add an action output that reflects the code comment the action would/does try to apply. |
Yessssssss let's return all the |
I started a new PR for this one. I haven't tried it anywhere yet, but you're welcome to give it a try if there's a reproduction you already have going. |
Is your feature request related to a problem? Please describe.
When a repository's actions/job/workflow aren/isn't configured with enough permissions,
mtfoley/pr-compliance-action
outputs very little information:JoshuaKGoldberg/template-typescript-node-package/actions/runs/5032810384/jobs/9026669253?pr=456
Per JoshuaKGoldberg/create-typescript-app#457, it looks like it's not always possible for repositories to be configured properly right now. Specifically - forks of public repos are just... not able to give write token permissions to actions run in PRs? (please correct me if I'm wrong!)
Describe the solution you'd like
Either way, how about one or (my preference) both of:
The text was updated successfully, but these errors were encountered: