Open peterbe opened 2 years ago
Hey @peterbe, if I understand correctly, adding read
permissions on pull-request
was the only change you applied to make it work?
I've added the permissions block to my workflow but the issue still persists.
permissions:
contents: read
# Needed for the 'trilom/file-changes-action' action
pull-requests: read
@john-jerome Don't know what it could be. I confirmed that this is all I have:
permissions:
contents: read
# Needed for the 'trilom/file-changes-action' action
pull-requests: read
and I'm able to use trilom/file-changes-action@a6ca26c14274c33b15e6499323aac178af06ad4b
in that Workflow.
But this action depends on the implicit GITHUB_TOKEN
which is automatically made available in most contexts.
See https://github.com/trilom/file-changes-action/blob/a6ca26c14274c33b15e6499323aac178af06ad4b/src/InputHelper.ts#L15
Perhaps whatever is running your workflow doesn't have access to GITHUB_TOKEN
.
Is your feature request related to a problem? Please describe.
I encountered this error:
Cryptic! Turns out, the solution was this:
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:Describe alternatives you've considered
n/a
Additional context
If it wasn't clear I'm suggesting any/either:
HttpError
and inject a possibly useful message about workflow permissions.