This repository has been archived by the owner on Oct 21, 2024. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What are you trying to accomplish?
Doing work in/from forks should not result in ❌.
What approach did you choose and why?
#24 introduced e2e tests that require all repositories with actions enabled that either update their
main
branch or receive PRs to theirmain
branch to have a valid and currentsecrets.REPO_WRITE_TOKEN
-- this is frustrating for people who do work in or from forks. PRs from forks do not get access to secrets, and thus they will fail miserably, as in https://github.com/actions/gh-actions-cache/actions/runs/5301791880/jobs/9600582421I considered adding a fallback, but afaict there's nothing remotely special about what this code is doing, so I merely defined correct permissions which enables this workflow to work out of the box in forks
or for PRs to this repo from forks.I've also made the slack hook conditional on the presence of the slack secret, as I'm not planning to add that secret to my fork(s).
Anything you want to highlight for special attention from reviewers?
The current changes only able PRs to work in forks, they don't allow PRs to work across forks, to do that would require switching from
pull_request
topull_request_target
which is perhaps scarier.