Backport: Skip pull_request triggered runs in private repos - 4.8 Branch - #12999
Draft
desrosj wants to merge 1 commit into
Draft
Backport: Skip pull_request triggered runs in private repos - 4.8 Branch#12999desrosj 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.8 branch.
Merge Conflict Resolution
git cherry-pickwas aborted because the vast majority of the workflow files touched by theoriginal commit do not exist on the 4.8 branch, which only has four workflow files at all:
coding-standards.yml,javascript-tests.yml,phpunit-tests.yml, andtest-build-processes.yml.The change was applied by hand to those four files instead, reusing the original commit message.
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 workflows, or an equivalentof them, exist in the 4.8 branch, so there was nothing to update.
coding-standards.yml: updated thejshintjob'sif:condition to the newprivate-repo/draft/label-gated form. The
slack-notificationsandfailed-workflowjobs aregated on
github.event_name != 'pull_request'and were left untouched, matching the originalcommit's scope.
javascript-tests.yml: updated thetest-jsjob'sif:condition the same way. Theslack-notificationsandfailed-workflowjobs were left untouched for the same reason as above.phpunit-tests.yml: updated thetest-phpjob'sif:condition the same way. On thisbranch,
test-phponly uses the simplegithub.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request'gate (the
startsWith( github.repository, 'WordPress/' ) && (...)wrapper seen in trunk'sphpunit-tests.ymlfor its matrix jobs does not exist on 4.8, since this branch predates theper-PHP-version reusable-workflow matrix split), so the canonical replacement condition was
used as-is. The
slack-notificationsandfailed-workflowjobs were left untouched.test-build-processes.yml: updated thetest-core-build-processjob'sif:condition thesame way. The
test-core-build-process-macosjob uses a stricter, unrelated condition(
github.repository == 'WordPress/wordpress-develop', with nopull_requestallowance at all,to limit consumption of the higher-cost macOS runner minutes) and was intentionally left
untouched, since it is not a member of the
... || github.event_name == 'pull_request'familythe original commit targeted. The
slack-notificationsandfailed-workflowjobs were leftuntouched as well.
No files outside
.github/workflows/were touched, and no file was created or deleted.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.