generated from actions/typescript-action
-
Notifications
You must be signed in to change notification settings - Fork 48
Open
Description
Is your feature request related to a problem? Please describe.
Cryptic! Turns out, the solution was this:
diff --git a/.github/workflows/link-check-all.yml b/.github/workflows/link-check-all.yml
index 510685a690a56..7c40cf65f5791 100644
--- a/.github/workflows/link-check-all.yml
+++ b/.github/workflows/link-check-all.yml
@@ -13,6 +13,8 @@ on:
permissions:
contents: read
+ # Needed for the 'trilom/file-changes-action' action
+ pull-requests: read
jobs:
build:Describe the solution you'd like
It took me too long to figure that out. I'm still getting used to setting permissions on my workflows.
Perhaps we can add this to the README or even possibly something like this:
} catch (error) {
+ if (error.name === 'HttpError' && +error.status === 403) {
+ console.warn("Make sure your workflow as the 'pull-requests: read' permission.")
+}
const eString = `There was an error getting change files for repo:${repo} owner:${owner} pr:${pullNumber}`
let ePayload: string
if (error.name === 'HttpError' && +error.status === 404)Describe alternatives you've considered
n/a
Additional context
If it wasn't clear I'm suggesting any/either:
- Add a troubleshooting section to the README
- Wrap the
HttpErrorand inject a possibly useful message about workflow permissions.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
