Backport: Skip pull_request triggered runs in private repos - 6.6 Branch - #12996
Draft
desrosj wants to merge 2 commits into
Draft
Backport: Skip pull_request triggered runs in private repos - 6.6 Branch#12996desrosj 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.6 branch.
Merge Conflict Resolution
The cherry-pick conflicted. The
6.6branch has a much smaller and differently shaped set of workflow files thantrunk, so several hunks were dropped and one job was updated by hand. Details:Files updated (6 files, 8 jobs)
All 8 jobs received the canonical replacement:
.github/workflows/coding-standards.yml—phpcsandjshintjobs (clean apply)..github/workflows/end-to-end-tests.yml—e2e-testsjob (clean apply)..github/workflows/javascript-tests.yml—test-jsjob (clean apply)..github/workflows/php-compatibility.yml—php-compatibilityjob (clean apply)..github/workflows/phpunit-tests.yml—test-with-mysqlandtest-with-mariadbjobs (conflicted, resolved by hand — see below)..github/workflows/test-build-processes.yml—test-core-build-process(clean apply) andtest-gutenberg-build-process(hand-applied, see below).Files from the original commit that do not exist on
6.6(hunks dropped)The cherry-pick reported
CONFLICT (modify/delete)for each of these and left thetrunkversion of the file in the tree. Each was removed withgit rmso that no new workflow file is introduced 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.github/workflows/workflow-lint.ymlphpunit-tests.ymlconflict resolutiontrunk's version of this workflow has diverged substantially from6.6's. Four conflict hunks:prepare-gutenbergjob — dropped. This job does not exist on6.6; the cherry-pick wanted to add the whole job. Kept the6.6side (no job).test-with-mysqlif:—6.6usessecrets: inheritand has nostartsWith( github.repository, 'WordPress/' ) && ( ... )outer wrapper (that wrapper was introduced ontrunkafter 6.6). Keptsecrets: inheritand applied the plain canonical replacement without thestartsWith()wrapper.test-with-mariadbif:— same as above.test-with-mariadbwith:block — dropped.trunkaddsgutenberg-artifact/gutenberg-shainputs and an entire additionaltest-with-innovation-releasesjob; neither exists on6.6. Kept the6.6side (report: ${{ matrix.report || false }}).Net effect on
phpunit-tests.yml: only the twoif:conditions changed; nothing else in the file was altered.Hand-applied change
.github/workflows/test-build-processes.yml, jobtest-gutenberg-build-process— this job no longer exists ontrunk(the Gutenberg build-process jobs were removed there), so the cherry-pick had no hunk for it. It carries the samegithub.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request'gate, so the same replacement was applied by hand.Deliberately not touched
.github/workflows/upgrade-testing.yml— this is not the equivalent oftrunk'supgrade-develop-testing.yml. Its jobs (upgrade-tests-wp-6x-mysql,upgrade-tests-wp-5x-php-7x-mysql,upgrade-tests-wp-5x-php-8x-mysql,upgrade-tests-wp-4x-php-7x-mysql,upgrade-tests-wp-4x-php-8x-mysql) are the direct ancestors oftrunk'supgrade-testing.yml, which r63183 did not touch.trunk'supgrade-develop-testing.ymlwas added after 6.6 (in24a2eacf7d) and has no counterpart here. Fiveif:gates of the affected family therefore remain unchanged in this file.test-core-build-process-macosandtest-gutenberg-build-process-macosintest-build-processes.yml— gated ongithub.repository == 'WordPress/wordpress-develop'only, not the affected family.slack-notificationsandfailed-workflowjobs — gated ongithub.event_name != 'pull_request', unaffected.props-bot.ymlandpull-request-comments.yml— out of scope.uses:path changes not carried overr63183 also switched
upgrade-develop-testing.ymlandworkflow-lint.ymlfromuses: WordPress/wordpress-develop/.github/workflows/<x>.yml@trunktouses: ./.github/workflows/<x>.yml. Neither file exists on6.6, and6.6has no localreusable-*.ymlworkflow files at all, so this portion was skipped entirely.Verification
git diff upstream/6.6 --statshows only the 6 files listed above, all under.github/workflows/.git grep -n -E '^(<<<<<<<|=======|>>>>>>>)' -- .githubreturns nothing).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.