Backport: Skip pull_request triggered runs in private repos - 5.5 Branch - #12986
Draft
desrosj wants to merge 1 commit into
Draft
Backport: Skip pull_request triggered runs in private repos - 5.5 Branch#12986desrosj 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 5.5 branch.
Merge Conflict Resolution
The cherry-pick conflicted. The
5.5branch contains only 5 of the 12 workflow files touched by the original commit, and the shared files have different surrounding content.Jobs updated (6 total, across 5 files) — all were the plain
github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request'form and received the canonical replacement condition verbatim:.github/workflows/coding-standards.yml—phpcs,jshint.github/workflows/javascript-tests.yml—test-js.github/workflows/php-compatibility.yml—php-compatibility.github/workflows/phpunit-tests.yml—test-php.github/workflows/test-build-processes.yml—test-core-build-processFiles from the original commit that do not exist on
5.5— hunks dropped entirely. The cherry-pick reported these asmodify/deleteconflicts and left the trunk versions in the working tree; each was removed withgit rmso no new file is introduced by this backport:end-to-end-tests.ymljavascript-type-checking.ymlperformance.ymlphpstan-static-analysis.ymltest-and-zip-default-themes.ymlupgrade-develop-testing.yml(no equivalent on this branch; there is noupgrade-testing.ymleither)workflow-lint.ymlContent conflicts and how they were resolved:
coding-standards.yml(phpcs),javascript-tests.yml(test-js),php-compatibility.yml(php-compatibility) — conflicted only because awith:block (php-version: '7.4'/disable-apparmor: true) follows theif:line on this branch but not on trunk. Resolved by taking the newif:block and keeping this branch'swith:block. Thejshintjob incoding-standards.ymlmerged cleanly.phpunit-tests.yml— conflicted badly. On trunk this workflow hasprepare-gutenberg,test-with-mysql,test-with-mariadb,test-with-sqliteand a fork-only job, none of which exist on5.5; the branch has a singletest-phpjob usingreusable-phpunit-tests-v2.yml. The merge attempted to import trunk's job structure. The file was reset to the branch version and the condition was hand-applied to the one in-scope job,test-php. All of trunk'sstartsWith( github.repository, 'WordPress/' ) && (...)hunks and the fork-only! startsWith(...)hunk were dropped — those jobs do not exist here.test-build-processes.yml— auto-merged cleanly; verified the result matches the canonical replacement.Deliberately not touched:
slack-notificationsandfailed-workflowjobs in all 5 files — gated ongithub.event_name != 'pull_request'and unaffected.test-core-build-process-macosintest-build-processes.yml— gated ongithub.repository == 'WordPress/wordpress-develop'only, which is not part of the targeted condition family and was not changed by the original commit.uses: WordPress/wordpress-develop/.github/workflows/<x>.yml@trunk→uses: ./.github/workflows/<x>.ymlchange was skipped: it applied only toupgrade-develop-testing.ymlandworkflow-lint.yml, neither of which exists on5.5. This branch has no local reusable workflow files at all.Verification:
git diff 5.5 --statshows only the 5 files above; no conflict markers remain; all 5 changed files parse as valid YAML and each of the 6 jobs was confirmed to carry the new condition.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.