Backport: Skip pull_request triggered runs in private repos - 4.7 Branch - #13002
Draft
desrosj wants to merge 1 commit into
Draft
Backport: Skip pull_request triggered runs in private repos - 4.7 Branch#13002desrosj 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 4.7 branch.
Merge Conflict Resolution
The 4.7 branch's
.github/workflows/directory only contains four of the twelve workflow files touched by the original commit:coding-standards.yml,javascript-tests.yml,phpunit-tests.yml, andtest-build-processes.yml.git cherry-pickproduced conflicts on every file (content conflicts on the four present files, plus modify/delete conflicts on the eight files that don't exist on this branch), so the cherry-pick was aborted and the change was applied by hand to only the jobs that exist here, using the original commit message.coding-standards.yml: updated theif:condition on thejshintjob (thephpcsjob present on trunk does not exist on this branch).javascript-tests.yml: updated theif:condition on thetest-jsjob.phpunit-tests.yml: updated theif:condition on thetest-phpjob. This branch'sphpunit-tests.ymlhas a single PHP-version job (nostartsWith( github.repository, 'WordPress/' )wrapper and no fork-only job), so only the simple form of the condition applies.test-build-processes.yml: updated theif:condition on thetest-core-build-processjob. Thetest-core-build-process-macosjob in this file uses a different, unrelated condition (github.repository == 'WordPress/wordpress-develop'only, nopull_requestfallback) and was left untouched, per the scope rules.The following files from the original commit do not exist on the 4.7 branch at all and were skipped entirely:
end-to-end-tests.yml,javascript-type-checking.yml,performance.yml,php-compatibility.yml,phpstan-static-analysis.yml,test-and-zip-default-themes.yml,upgrade-develop-testing.yml,workflow-lint.yml. None of these (or an equivalent under a different name) exist on this branch, so there was nothing to map the change to. Theuses: .../@trunktouses: ./...conversion (originally done inupgrade-develop-testing.ymlandworkflow-lint.yml) does not apply here since neither file exists on this branch.No Slack-notification jobs, and no workflows outside the scope of the original commit, were modified.
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.