Backport: Skip pull_request triggered runs in private repos - 6.2 Branch - #12994
Draft
desrosj wants to merge 2 commits into
Draft
Backport: Skip pull_request triggered runs in private repos - 6.2 Branch#12994desrosj wants to merge 2 commits into
desrosj wants to merge 2 commits 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 6.2 branch.
Merge Conflict Resolution
The cherry-pick conflicted. The
6.2branch has only 7 workflow files, and the ones it shares withtrunkare structured differently, so a number of hunks had to be dropped or hand-applied.Files from the original commit that do not exist on
6.2(dropped entirely)These came through as
modify/deleteconflicts and weregit rm'd, since the files have never existed on this branch:.github/workflows/javascript-type-checking.yml.github/workflows/performance.yml.github/workflows/phpstan-static-analysis.yml.github/workflows/test-and-zip-default-themes.yml.github/workflows/upgrade-develop-testing.yml— no equivalent (there is noupgrade-testing.ymlon this branch either).github/workflows/workflow-lint.ymlBecause
upgrade-develop-testing.ymlandworkflow-lint.ymldo not exist here, the part of the original commit that switched those two workflows fromuses: WordPress/wordpress-develop/.github/workflows/<x>.yml@trunktouses: ./.github/workflows/<x>.ymlwas not carried over.6.2has noreusable-*.ymlworkflow files of its own, so that change would not have been valid on this branch regardless.Conflicts resolved in shared files
coding-standards.yml(phpcsjob) — content conflict. On6.2theif:is immediately followed by awith: php-version: '7.4'block that does not exist ontrunk. Resolved by taking the new multi-lineif:from the commit and keeping the branch's existingwith:block after it. The second job in this file,jshint, merged cleanly.php-compatibility.yml(php-compatibilityjob) — same conflict and same resolution: newif:, existingwith: php-version: '7.4'retained.phpunit-tests.yml— large content conflict.trunkhas since been restructured intoprepare-gutenberg,test-with-mysql,test-with-mariadb,test-innovation-releases,html-api-test-groups, andlimited-matrix-for-forksjobs;6.2has a singletest-phpjob usingsecrets: inherit. The cherry-pick tried to import trunk's entire job structure into this branch. The file was reset to the6.2version and the condition was hand-applied to the one job that carries the target gate (test-php), using the canonical replacement form. ThestartsWith( github.repository, 'WordPress/' )wrapper and the fork-onlylimited-matrix-for-forksvariant from the original commit do not apply here, because6.2has no such job split.Files that merged cleanly
end-to-end-tests.yml(e2e-tests),javascript-tests.yml(test-js), andtest-build-processes.yml(test-core-build-process).Deliberately left untouched
slack-notificationsandfailed-workflowjobs — these are gated ongithub.event_name != 'pull_request'and are unaffected.test-build-processes.yml→test-core-build-process-macos, gated only ongithub.repository == 'WordPress/wordpress-develop', which is not the condition family this commit changes.welcome-new-contributors.yml, which the original commit did not touch.Net result
7 jobs across 6 files now carry the new condition:
coding-standards.yml(phpcs,jshint),end-to-end-tests.yml(e2e-tests),javascript-tests.yml(test-js),php-compatibility.yml(php-compatibility),phpunit-tests.yml(test-php), andtest-build-processes.yml(test-core-build-process). All six changed files were confirmed to parse as valid YAML, and the diff touches nothing outside.github/workflows/.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.