Skip to content

Backport: Skip pull_request triggered runs in private repos - 6.4 Branch - #12993

Draft
desrosj wants to merge 2 commits into
WordPress:6.4from
desrosj:backport/6.4-branch-63183
Draft

Backport: Skip pull_request triggered runs in private repos - 6.4 Branch#12993
desrosj wants to merge 2 commits into
WordPress:6.4from
desrosj:backport/6.4-branch-63183

Conversation

@desrosj

@desrosj desrosj commented Aug 12, 2026

Copy link
Copy Markdown
Member

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

Merge Conflict Resolution

The cherry-pick conflicted. The 6.4 branch has a much smaller and older set of workflow files than trunk, so a number of hunks were dropped and two files were adapted by hand. Details:

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

These came through as modify/delete conflicts and were git rm'd so they are not created 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.yml

Because upgrade-develop-testing.yml and workflow-lint.yml do not exist on 6.4, 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. The referenced reusable workflows (reusable-build-package.yml, reusable-upgrade-testing.yml, reusable-workflow-lint.yml) also do not exist on 6.4.

Applied cleanly (auto-merged, one job each unless noted)

  • .github/workflows/coding-standards.ymlphpcs and jshint (2 jobs).
  • .github/workflows/end-to-end-tests.ymle2e-tests.
  • .github/workflows/javascript-tests.ymltest-js.
  • .github/workflows/php-compatibility.ymlphp-compatibility.
  • .github/workflows/test-build-processes.ymltest-core-build-process. The test-core-build-process-macos job is gated only on github.repository == 'WordPress/wordpress-develop' and was left alone.

.github/workflows/phpunit-tests.yml (content conflict, hand-resolved)

The 6.4 version of this workflow only contains two jobs from the family (test-with-mysql and test-with-mariadb), and neither is wrapped in the startsWith( github.repository, 'WordPress/' ) && ( ... ) guard that trunk uses. Resolution:

  • Applied the plain (non-startsWith) form of the new condition to test-with-mysql and test-with-mariadb.
  • Kept 6.4's existing secrets: inherit rather than importing trunk's explicit CODECOV_TOKEN / WPT_REPORT_API_KEY secret list.
  • Kept 6.4's report: ${{ matrix.report || false }} input.
  • Dropped the incoming prepare-gutenberg, test-innovation-releases, html-api-test-groups, and limited-matrix-for-forks jobs entirely — none of them exist on 6.4 and they were only pulled in as conflict context. This also means the fork-only limited-matrix-for-forks variant of the condition is not present on this branch.

.github/workflows/upgrade-testing.yml (hand-applied, judgment call — please confirm)

trunk's upgrade-develop-testing.yml has no direct counterpart on 6.4. 6.4's upgrade-testing.yml is the ancestor of trunk's upgrade-testing.yml, which the original commit did not touch — on trunk those jobs are already gated on github.repository == 'WordPress/wordpress-develop' alone, so there was nothing there to change. On 6.4 they still carry the old ... || github.event_name == 'pull_request' gate, so the new condition was applied by hand to all five upgrade test jobs to match the intent of the commit:

  • 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

If this is considered out of scope for the backport, this file can be reverted independently without affecting the rest of the change.

Left untouched

  • All slack-notifications and failed-workflow jobs (gated on github.event_name != 'pull_request').
  • .github/workflows/upgrade-testing-run.yml (reusable workflow, no gates of this family).
  • .github/workflows/welcome-new-contributors.yml.

Verification performed

  • git diff upstream/6.4 --stat shows changes only under .github/workflows/ (7 files, +104/-13).
  • No conflict markers remain (git grep -E '^(<<<<<<<|=======|>>>>>>>)' -- .github returns nothing).
  • All nine workflow files on the branch parse successfully with PyYAML.
  • No occurrences of the old github.event_name == 'pull_request' }} gate remain in .github/workflows/.

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