post-build: Check out PR commit as well as trunk for plugin upgrade test #28599
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.
Proposed changes:
There was a subtle change in the plugin upgrade test in the move from the Build to the Post-Build workflow: since the latter runs via
workflow_run, the "current" branch is trunk rather than the PR commit, so that's what gets checked out.Mostly that works fine, but at one point we look in the checkout for the plugin's
wp-plugin-slug. For that one check, we need a copy of the PR commit rather than trunk. But we want to keep everything else running off of trunk to avoid potential security issues (the same ones that led GitHub to introduce the "pull_request_target" event).Other information:
Jetpack product discussion
#28479 (comment)
Does this pull request change what data or activity we track or use?
No
Testing instructions: