Skip to content

Backport: Skip pull_request triggered runs in private repos - 5.8 Branch - #12978

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

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

Conversation

@desrosj

@desrosj desrosj commented Aug 12, 2026

Copy link
Copy Markdown
Member

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

Merge Conflict Resolution

The cherry-pick conflicted. The 5.8 branch only has 6 workflow files, and the ones it does have are shaped differently than on trunk. Here is exactly what was done:

Files that do not exist on 5.8 (hunks dropped entirely). The cherry-pick reported these as modify/delete conflicts and left the trunk version of each file in the tree. Each was removed with git rm so no new workflow files are introduced to 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 (and their reusable-* counterparts) do not exist on 5.8, the uses: WordPress/wordpress-develop/.github/workflows/<x>.yml@trunkuses: ./.github/workflows/<x>.yml portion of the original commit was not carried over.

Files that applied cleanly:

  • end-to-end-tests.yml (e2e-tests job)
  • test-build-processes.yml (test-core-build-process job)

Files with content conflicts, resolved by hand:

  • coding-standards.yml — the phpcs job conflicted because 5.8 passes with: php-version: '7.4' immediately after the if: line. Resolved by keeping the branch's with: block and replacing only the if: condition. The jshint job merged cleanly.
  • javascript-tests.yml — the test-js job conflicted because 5.8 passes with: disable-apparmor: true after the if: line. Resolved by keeping the branch's with: block and replacing only the if: condition.
  • php-compatibility.yml — the php-compatibility job conflicted for the same reason as phpcs (with: php-version: '7.4'). Resolved the same way.
  • phpunit-tests.yml — large conflict. On trunk this file has prepare-gutenberg, test-with-mysql, test-with-mariadb, test-innovation-releases, html-api-test-groups, and limited-matrix-for-forks jobs. On 5.8 there is a single test-php job that calls reusable-phpunit-tests-v2.yml and uses secrets: inherit. All incoming job definitions from trunk were dropped, the branch's secrets: inherit line was preserved, and the new condition was applied only to the existing test-php job. The startsWith( github.repository, 'WordPress/' ) && (...) and fork-only (! startsWith(...)) variants from the original commit have no equivalent on 5.8, so those shapes were not needed here.

Jobs deliberately left untouched:

  • All slack-notifications and failed-workflow jobs (gated on github.event_name != 'pull_request', unaffected).
  • test-build-processes.ymltest-core-build-process-macos, which is gated on github.repository == 'WordPress/wordpress-develop' only and is not part of the condition family this commit changes.

Verification performed: the diff against 5.8 touches only .github/workflows/; no conflict markers remain; all six workflow files parse as valid YAML.

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