Backport: Skip pull_request triggered runs in private repos - 7.1 Branch - #12984
Draft
desrosj wants to merge 1 commit into
Draft
Backport: Skip pull_request triggered runs in private repos - 7.1 Branch#12984desrosj wants to merge 1 commit into
desrosj wants to merge 1 commit into
Conversation
This modifies the conditions for GitHub Actions workflow runs so that they do not run within private forks and mirrors for `pull_request` events when the PR is in `draft` status. For situations where this may be desirable, a `Draft Workflow Runs` label can be added to a `draft` pull request to force workflows to run. Props desrosj, jorbin. See #65848. git-svn-id: https://develop.svn.wordpress.org/trunk@63183 602fd350-edb4-49c9-b593-d223f7449a82
Test using WordPress PlaygroundThe changes in this pull request can previewed and tested using a WordPress Playground instance. WordPress Playground is an experimental project that creates a full WordPress instance entirely within the browser. Some things to be aware of
For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation. |
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.
This backports 15c4b04 (r63183) to the 7.1 branch.
Merge Conflict Resolution
The cherry-pick applied cleanly to 10 of the 12 files. Two adaptations were required:
1.
.github/workflows/test-and-zip-default-themes.yml— dropped entirelyThis file does not exist on the
7.1branch. It is intentionally deleted from numbered release branches by the "Post 7.1 branching changes for the 7.1 branch" commit (dfdd339309), since default theme testing/zipping is only performed ontrunk. The cherry-pick reported amodify/deleteconflict and lefttrunk's version of the file in the tree; it was removed withgit rmso the file is not created on this branch. Bothif:conditions the original commit changed in that file (test-and-zip-themesand the second theme job) were therefore dropped.There is no equivalent renamed file on
7.1— no workflow on this branch handles default theme testing or zipping.2.
uses:changes to local reusable workflow paths — not carried overThe original commit also switched three
uses:references fromWordPress/wordpress-develop/.github/workflows/<x>.yml@trunkto the local./.github/workflows/<x>.ymlform:upgrade-develop-testing.yml→reusable-build-package.ymlupgrade-develop-testing.yml→reusable-upgrade-testing.ymlworkflow-lint.yml→reusable-workflow-lint.ymlThe
7.1branch contains noreusable-*.ymlfiles in.github/workflows/at all — numbered branches deliberately consume the reusable workflows fromtrunk. Switching to a local path would break these workflows. Per the backport scope rules, these threeuses:lines were reverted to their original@trunkform after the cherry-pick, and only theif:condition changes were kept in those two files.Everything else
All remaining hunks applied without modification. No job condition had to be hand-written from scratch — every
if:gate in the familygithub.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request'(including thestartsWith( github.repository, 'WordPress/' ) && (...)variants, the&& ! contains( github.event.before, '00000000' )variant inperformance.yml, the fork-only variant inphpunit-tests.yml, and the push-inclusive variant inupgrade-develop-testing.yml) was a clean textual match on this branch.A post-application sweep of
.github/workflows/confirmed no jobs of that condition family remain unconverted on7.1. Slack notification jobs (gated ongithub.event_name != 'pull_request') were left untouched, as wereprops-bot.yml,pull-request-comments.yml,cleanup-pull-requests.yml,check-built-files.yml, andlocal-docker-environment.yml, none of which the original commit touched.All 16 workflow files on this branch were verified to parse as valid YAML after the change.
Use of AI Tools
This pull request was created by an AI agent (Claude Code). Until this PR is marked "Ready for Review", treat it as untrusted, AI-created code that requires a manual review by a human team member.