Skip to content

Backport: Skip pull_request triggered runs in private repos - 6.0 Branch - #12997

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

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

Conversation

@desrosj

@desrosj desrosj commented Aug 12, 2026

Copy link
Copy Markdown
Member

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

Merge Conflict Resolution

The cherry-pick conflicted. The 6.0 branch has a much smaller set of workflow files and older job definitions, so the following adaptations were made.

Files from the original commit that do not exist on the 6.0 branch (dropped entirely, git rm'd after the cherry-pick left them in the tree):

  • .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 upgrade-testing.yml exists on 6.0 either)
  • .github/workflows/workflow-lint.yml

Because upgrade-develop-testing.yml and workflow-lint.yml do not exist on this branch, the uses: WordPress/wordpress-develop/.github/workflows/<x>.yml@trunkuses: ./.github/workflows/<x>.yml portion of the original commit was not carried over. The 6.0 branch also has no reusable-*.yml workflow files of its own, so local uses: references would not resolve.

Files that applied cleanly (no conflict):

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

Conflicts resolved by hand:

  • .github/workflows/coding-standards.yml — the phpcs job conflicted because 6.0 has a with: php-version: '7.4' block immediately after the if:, which trunk no longer has. Resolution: took the new multi-line if: condition from the commit and kept 6.0's with: block after it. The jshint job in the same file merged cleanly.
  • .github/workflows/javascript-tests.yml — the test-js job conflicted for the same reason (6.0 has with: disable-apparmor: true after the if:). Resolution: new if: condition followed by 6.0's existing with: block.
  • .github/workflows/php-compatibility.yml — the php-compatibility job conflicted for the same reason (with: php-version: '7.4'). Resolution: new if: condition followed by 6.0's existing with: block.
  • .github/workflows/phpunit-tests.yml — three conflict hunks:
    1. The commit wanted to add a new prepare-gutenberg job (and its jobs: key). That job does not exist on 6.0 and the reusable workflow it calls is not applicable here, so the hunk was dropped.
    2. The test-php job conflicted: 6.0 uses secrets: inherit (trunk lists individual secrets) and 6.0's condition is the plain github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' form without trunk's startsWith( github.repository, 'WordPress/' ) && ( ... ) wrapper. Resolution: kept 6.0's secrets: inherit, and applied the canonical replacement condition without the startsWith( ... ) wrapper, since that wrapper is not part of the 6.0 gate and adding it would change which repos run the job.
    3. A large hunk that would have pulled in trunk-only jobs (test-with-mariadb, the SQLite/fork jobs, Gutenberg artifact inputs, etc.) into 6.0. Dropped entirely; 6.0's test-php job body is unchanged.

Intentionally not touched:

  • All slack-notifications jobs (gated on github.event_name != 'pull_request') and all failed-workflow jobs.
  • .github/workflows/test-build-processes.ymltest-core-build-process-macos, which is gated only on github.repository == 'WordPress/wordpress-develop' and is not part of the || github.event_name == 'pull_request' family.
  • .github/workflows/welcome-new-contributors.yml, which the original commit did not touch.

Verification performed: the diff against 6.0 touches only files under .github/workflows/; no conflict markers remain; all six changed YAML files parse with PyYAML and expose the expected job keys.

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