Backport: Skip pull_request triggered runs in private repos - 5.1 Branch - #13000
Draft
desrosj wants to merge 1 commit into
Draft
Backport: Skip pull_request triggered runs in private repos - 5.1 Branch#13000desrosj 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.
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 5.1 branch.
Merge Conflict Resolution
The direct
git cherry-pickof 15c4b04 produced conflicts in every touched file and wanted to (re)create several workflow files that do not exist on the 5.1 branch (git-svnhistory renamed/restructured many workflow files between 5.1 and trunk). The cherry-pick was aborted and the change was applied by hand, file by file, preserving the original commit message.The 5.1 branch only has 4 files under
.github/workflows/:coding-standards.yml,javascript-tests.yml,phpunit-tests.yml, andtest-build-processes.yml. Each was checked for jobs using theif: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }}gate and updated in place to the canonical replacement:Jobs updated:
.github/workflows/coding-standards.yml:phpcsandjshintjobs..github/workflows/javascript-tests.yml:test-jsjob..github/workflows/phpunit-tests.yml:test-phpjob (this branch has a single PHP/MySQL test job, not the per-combination matrix jobs added later on trunk, so there was only one job to update here)..github/workflows/test-build-processes.yml:test-core-build-processjob. Thetest-core-build-process-macosjob in the same file was intentionally left untouched — its condition is onlygithub.repository == 'WordPress/wordpress-develop'(no|| github.event_name == 'pull_request'clause), so it is not part of the affected family and was out of scope.Files from the original commit that do not exist on the 5.1 branch and were therefore skipped entirely (not created):
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 have an equivalent under a different name on this branch.The
slack-notificationsandfailed-workflowjobs in each of the 4 files were left untouched, as they are gated ongithub.event_name != 'pull_request'and are unaffected by this change.No files outside
.github/workflows/were touched.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.