{{ message }}
ci(docs-preview): Acquire PR context via gh CLI#4267
Merged
Conversation
Member
Author
This was referenced Nov 19, 2024
Thanks a lot for this!! ⭐ Really helpful Just a small correction: there are two Solution B , I can't |
Member
Author
Glad to hear that 🎉
Whoops! Thanks for pointing that out, I've corrected it 😅 |
casperklein
previously approved these changes
Nov 19, 2024
This was referenced Nov 20, 2024
pwntester
reviewed
Nov 20, 2024
| # Required by `set-pr-context`: | ||
| contents: read | ||
| # Required by `marocchino/sticky-pull-request-comment` (write) + `set-pr-context` (read): | ||
| pull-requests: write |
There was a problem hiding this comment.
Better to move the write permissions to the job that needs them (deploy-preview)
| && github.event.workflow_run.event == 'pull_request' | ||
| && contains(github.event.workflow_run.pull_requests.*.head.sha, github.event.workflow_run.head_sha) | ||
| PR_HEADSHA: ${{ steps.set-pr-context.outputs.head-sha }} | ||
| PR_NUMBER: ${{ steps.set-pr-context.outputs.number }} |
jerith666
added a commit
to jerith666/elbum
that referenced
this pull request
Jan 12, 2025
jerith666
added a commit
to jerith666/elbum
that referenced
this pull request
Jan 12, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.

Description
A
pull_request+workflow_runsolution that should work well with PRs from forks.Adapted from Solution 4 description. Related solutions overview detailed here.My preference is still to
pull_request_target+workflow_call,but that is awaiting confirmation that it was implemented securely(EDIT: It is not secure, unless the untrusted code is only executed in an environment like a container).UPDATE: Due to review feedback of #4264 (Solution C), while I do prefer that approach I am not comfortable moving forward with it for the project and will favor this PR (Solution B).
Type of change
Checklist
CHANGELOG.md