Skip to content

Backport: Skip pull_request triggered runs in private repos - 6.2 Branch - #12994

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

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

Conversation

@desrosj

@desrosj desrosj commented Aug 12, 2026

Copy link
Copy Markdown
Member

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

Merge Conflict Resolution

The cherry-pick conflicted. The 6.2 branch has only 7 workflow files, and the ones it shares with trunk are structured differently, so a number of hunks had to be dropped or hand-applied.

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

These came through as modify/delete conflicts and were git rm'd, since the files have never existed 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 — no equivalent (there is no upgrade-testing.yml on this branch either)
  • .github/workflows/workflow-lint.yml

Because upgrade-develop-testing.yml and workflow-lint.yml do not exist here, 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. 6.2 has no reusable-*.yml workflow files of its own, so that change would not have been valid on this branch regardless.

Conflicts resolved in shared files

  • coding-standards.yml (phpcs job) — content conflict. On 6.2 the if: is immediately followed by a with: php-version: '7.4' block that does not exist on trunk. Resolved by taking the new multi-line if: from the commit and keeping the branch's existing with: block after it. The second job in this file, jshint, merged cleanly.
  • php-compatibility.yml (php-compatibility job) — same conflict and same resolution: new if:, existing with: php-version: '7.4' retained.
  • phpunit-tests.yml — large content conflict. trunk has since been restructured into prepare-gutenberg, test-with-mysql, test-with-mariadb, test-innovation-releases, html-api-test-groups, and limited-matrix-for-forks jobs; 6.2 has a single test-php job using secrets: inherit. The cherry-pick tried to import trunk's entire job structure into this branch. The file was reset to the 6.2 version and the condition was hand-applied to the one job that carries the target gate (test-php), using the canonical replacement form. The startsWith( github.repository, 'WordPress/' ) wrapper and the fork-only limited-matrix-for-forks variant from the original commit do not apply here, because 6.2 has no such job split.

Files that merged cleanly

end-to-end-tests.yml (e2e-tests), javascript-tests.yml (test-js), and test-build-processes.yml (test-core-build-process).

Deliberately left untouched

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

Net result

7 jobs across 6 files now carry the new condition: coding-standards.yml (phpcs, jshint), end-to-end-tests.yml (e2e-tests), javascript-tests.yml (test-js), php-compatibility.yml (php-compatibility), phpunit-tests.yml (test-php), and test-build-processes.yml (test-core-build-process). All six changed files were confirmed to parse as valid YAML, and the diff touches nothing outside .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