Skip to content

Backport: Skip pull_request triggered runs in private repos - 5.6 Branch - #12982

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

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

Conversation

@desrosj

@desrosj desrosj commented Aug 12, 2026

Copy link
Copy Markdown
Member

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

Merge Conflict Resolution

The cherry-pick conflicted. The 5.6 branch only contains 5 workflow files, so most of the original commit did not apply.

Files updated (6 jobs total, all with the standard replacement condition):

  • .github/workflows/coding-standards.ymlphpcs and jshint jobs. The phpcs job conflicted because on 5.6 it is followed by a with: php-version: '7.4' block that does not exist on trunk; resolved by taking the new if: and keeping the existing with: block. The jshint job merged cleanly.
  • .github/workflows/javascript-tests.ymltest-js job. Conflicted for the same reason (5.6 has a with: disable-apparmor: true block after the if:); resolved by taking the new if: and keeping with:.
  • .github/workflows/php-compatibility.ymlphp-compatibility job. Same conflict shape (with: php-version: '7.4'); resolved the same way.
  • .github/workflows/phpunit-tests.ymltest-php job. The incoming diff tried to pull in trunk-only jobs (prepare-gutenberg, test-with-mysql, test-with-mariadb, the fork-only job, etc.) that do not exist on 5.6. The file was reset to the 5.6 version and the condition was applied by hand to the single gated job, test-php, preserving the branch's secrets: inherit line.
  • .github/workflows/test-build-processes.ymltest-core-build-process job. Merged cleanly.

Hunks dropped because the file does not exist on 5.6:

  • .github/workflows/end-to-end-tests.yml
  • .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 on this branch either)
  • .github/workflows/workflow-lint.yml

Each of these was left in the tree by the cherry-pick as a modify/delete conflict and was removed with git rm, since creating them on 5.6 is out of scope.

Other pieces intentionally not carried over:

  • The uses: WordPress/wordpress-develop/.github/workflows/<x>.yml@trunkuses: ./.github/workflows/<x>.yml change from the original commit applied only to upgrade-develop-testing.yml and workflow-lint.yml, neither of which exists on 5.6. No reusable workflow files exist in this branch's .github/workflows/ directory, so nothing was converted to a local path.
  • The trunk-only condition shapes (the startsWith( github.repository, 'WordPress/' ) && (...) wrapper, the ! contains( github.event.before, '00000000' ) clause, the fork-only job variant, and the push-event variant) have no counterpart on 5.6; every gated job on this branch uses the plain github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' form.
  • test-build-processes.yml's test-core-build-process-macos job is gated only on github.repository == 'WordPress/wordpress-develop' and is not part of the affected family, so it was left alone (matching the original commit, which only touched one job in that file).
  • Slack notification and failed-workflow jobs are gated on github.event_name != 'pull_request' and were not touched.

Verification: the diff against 5.6 touches only files under .github/workflows/, contains no conflict markers, and all 5 changed YAML files parse successfully.

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