Skip to content

Backport: Skip pull_request triggered runs in private repos - 5.9 Branch - #12989

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

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

Conversation

@desrosj

@desrosj desrosj commented Aug 12, 2026

Copy link
Copy Markdown
Member

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

Merge Conflict Resolution

The 5.9 branch has a much smaller and older set of workflow files than trunk, so the cherry-pick conflicted. Notes on exactly what was applied, dropped, and hand-edited:

Files from the original commit that do not exist on 5.9 (dropped entirely)

These came through as modify/delete conflicts (the commit modified them, 5.9 does not have them). They were git rm'd so that the backport does not introduce brand new workflow files onto 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.yml

Because upgrade-develop-testing.yml and workflow-lint.yml do not exist on 5.9, the part of the original commit that switched those two workflows from uses: WordPress/wordpress-develop/.github/workflows/<x>.yml@trunk to uses: ./.github/workflows/<x>.yml was not carried over. No reusable-build-package.yml, reusable-upgrade-testing.yml, or reusable-workflow-lint.yml exists on this branch either, so no local uses: reference would resolve.

Files that applied cleanly

  • .github/workflows/end-to-end-tests.ymle2e-tests job.
  • .github/workflows/test-build-processes.ymltest-core-build-process job.

Files that conflicted and were resolved by hand

In each of these, the 5.9 version of the job differs from trunk (extra with: blocks, secrets: inherit instead of named secrets, different job names/structure), so the surrounding lines did not match. The 5.9 content was kept as-is and only the if: expression was replaced with the new condition:

  • .github/workflows/coding-standards.ymlphpcs job (conflicted because 5.9 has a with: php-version: '7.4' block immediately after the if:) and jshint job.
  • .github/workflows/javascript-tests.ymltest-js job (conflicted because 5.9 has a with: disable-apparmor: true block after the if:).
  • .github/workflows/php-compatibility.ymlphp-compatibility job (conflicted because 5.9 has a with: php-version: '7.4' block after the if:).
  • .github/workflows/phpunit-tests.ymltest-php job. This file conflicted heavily: 5.9 has a single test-php job with secrets: inherit, while trunk has prepare-gutenberg, test-with-mysql, test-with-mariadb, test-innovation-releases, html-api-test-groups, and limited-matrix-for-forks. Only the existing test-php job was updated. None of the trunk-only jobs were added, so the startsWith( github.repository, 'WordPress/' ) && (...) variant and the fork-only limited-matrix-for-forks variant of the condition do not appear on this branch — 5.9's test-php uses the plain github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' form and therefore received the plain replacement condition.

Intentionally left untouched

  • All slack-notifications and failed-workflow jobs — they are gated on github.event_name != 'pull_request' and are unaffected.
  • .github/workflows/test-build-processes.yml – the test-core-build-process-macos job is gated only on github.repository == 'WordPress/wordpress-develop', which is not part of the condition family this commit changes.
  • .github/workflows/welcome-new-contributors.yml — not touched by the original commit.

Net result

6 files changed, all under .github/workflows/. Seven job if: gates updated in total. All changed files were verified to parse as valid YAML and contain no conflict markers.

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