Skip to content

Backport: Skip pull_request triggered runs in private repos - 5.5 Branch - #12986

Draft
desrosj wants to merge 1 commit into
WordPress:5.5from
desrosj:backport/5.5-branch-63183
Draft

Backport: Skip pull_request triggered runs in private repos - 5.5 Branch#12986
desrosj wants to merge 1 commit into
WordPress:5.5from
desrosj:backport/5.5-branch-63183

Conversation

@desrosj

@desrosj desrosj commented Aug 12, 2026

Copy link
Copy Markdown
Member

This backports 15c4b04 (r63183) to the 5.5 branch.

Merge Conflict Resolution

The cherry-pick conflicted. The 5.5 branch 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.ymlphpcs, jshint
  • .github/workflows/javascript-tests.ymltest-js
  • .github/workflows/php-compatibility.ymlphp-compatibility
  • .github/workflows/phpunit-tests.ymltest-php
  • .github/workflows/test-build-processes.ymltest-core-build-process

Files from the original commit that do not exist on 5.5 — hunks dropped entirely. The cherry-pick reported these as modify/delete conflicts and left the trunk versions in the working tree; each was removed with git rm so no new file is introduced by this backport:

  • end-to-end-tests.yml
  • javascript-type-checking.yml
  • performance.yml
  • phpstan-static-analysis.yml
  • test-and-zip-default-themes.yml
  • upgrade-develop-testing.yml (no equivalent on this branch; there is no upgrade-testing.yml either)
  • workflow-lint.yml

Content conflicts and how they were resolved:

  • coding-standards.yml (phpcs), javascript-tests.yml (test-js), php-compatibility.yml (php-compatibility) — conflicted only because a with: block (php-version: '7.4' / disable-apparmor: true) follows the if: line on this branch but not on trunk. Resolved by taking the new if: block and keeping this branch's with: block. The jshint job in coding-standards.yml merged cleanly.
  • phpunit-tests.yml — conflicted badly. On trunk this workflow has prepare-gutenberg, test-with-mysql, test-with-mariadb, test-with-sqlite and a fork-only job, none of which exist on 5.5; the branch has a single test-php job using reusable-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's startsWith( 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-notifications and failed-workflow jobs in all 5 files — gated on github.event_name != 'pull_request' and unaffected.
  • test-core-build-process-macos in test-build-processes.yml — gated on github.repository == 'WordPress/wordpress-develop' only, which is not part of the targeted condition family and was not changed by the original commit.
  • The trunk uses: WordPress/wordpress-develop/.github/workflows/<x>.yml@trunkuses: ./.github/workflows/<x>.yml change was skipped: it applied only to upgrade-develop-testing.yml and workflow-lint.yml, neither of which exists on 5.5. This branch has no local reusable workflow files at all.

Verification: git diff 5.5 --stat shows 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.

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
@desrosj desrosj self-assigned this Aug 12, 2026
@github-actions

Copy link
Copy Markdown

Test using WordPress Playground

The 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

  • All changes will be lost when closing a tab with a Playground instance.
  • All changes will be lost when refreshing the page.
  • A fresh instance is created each time the link below is clicked.
  • Every time this pull request is updated, a new ZIP file containing all changes is created. If changes are not reflected in the Playground instance,
    it's possible that the most recent build failed, or has not completed. Check the list of workflow runs to be sure.

For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation.

Test this pull request with WordPress Playground.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant