Skip to content

Backport: Skip pull_request triggered runs in private repos - 5.3 Branch - #12987

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

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

Conversation

@desrosj

@desrosj desrosj commented Aug 12, 2026

Copy link
Copy Markdown
Member

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

Merge Conflict Resolution

The cherry-pick conflicted. The 5.3 branch has only four workflow files in .github/workflows/: coding-standards.yml, javascript-tests.yml, phpunit-tests.yml, and test-build-processes.yml. Eight of the twelve files touched by the original commit do not exist on this branch, and the two files that conflicted textually differ structurally from trunk.

Files dropped entirely (do not exist on 5.3, and have no equivalent here)

The cherry-pick tried to create these as new files because they are absent on 5.3. Each was git rm'd so no new workflow file is introduced by this backport:

  • 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 (5.3 has no upgrade-testing.yml equivalent either)
  • workflow-lint.yml

Because upgrade-develop-testing.yml and workflow-lint.yml do not exist here, the original commit's change from uses: WordPress/wordpress-develop/.github/workflows/<x>.yml@trunk to uses: ./.github/workflows/<x>.yml was not carried over. 5.3 has no local reusable-*.yml files at all, so that piece is not applicable to this branch.

coding-standards.yml — conflicted (content)

Both the phpcs and jshint jobs matched the target pattern and both received the new condition.

The phpcs job conflicted because on 5.3 the if: line is immediately followed by a with: block that does not exist on trunk:

    with:
      php-version: '7.3'
      old-branch: true

Resolved by replacing only the if: expression and preserving that with: block unchanged. The jshint job merged cleanly.

javascript-tests.yml — conflicted (content)

The test-js job conflicted for the same reason: on 5.3 the if: line is followed by a with: disable-apparmor: true block not present on trunk. Resolved by replacing only the if: expression and preserving the with: block.

phpunit-tests.yml — conflicted (content), resolved by hand

This was the largest divergence. Trunk has six jobs in this file (prepare-gutenberg, test-with-mysql, test-with-mariadb, test-with-sqlite, a fork-only job, plus notifications); 5.3 has a single test-php job that calls reusable-phpunit-tests-v2.yml. The three-way merge tried to splice trunk's job structure into this file.

Resolution: the 5.3 version of the file was restored in full (git checkout HEAD -- .github/workflows/phpunit-tests.yml) and the condition was applied by hand to the one job that matches the target pattern, test-php. Its secrets: inherit line (5.3-only) is preserved above the new if:. The trunk hunks for test-with-mysql, test-with-mariadb, test-with-sqlite, and the fork-only ! startsWith( github.repository, 'WordPress/' ) job were dropped because none of those jobs exist on this branch. Consequently no startsWith( github.repository, 'WordPress/' ) && ( ... ) variant appears in this backport.

test-build-processes.yml — merged cleanly

The test-core-build-process job merged without conflict. The test-core-build-process-macos job was deliberately left alone: its gate is if: ${{ github.repository == 'WordPress/wordpress-develop' }}, which is not part of the || github.event_name == 'pull_request' family and is unaffected by the original commit.

Not touched

slack-notifications and failed-workflow jobs in all four files are gated on github.event_name != 'pull_request' and were left unchanged, per the original commit.

Verification

  • git diff upstream/5.3 --stat shows only the four files above, all under .github/workflows/.
  • No conflict markers remain in .github.
  • All four changed files parse as valid YAML, and their job lists are unchanged from the 5.3 originals.

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