Skip to content

Backport: Skip pull_request triggered runs in private repos - 5.7 Branch - #12980

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

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

Conversation

@desrosj

@desrosj desrosj commented Aug 12, 2026

Copy link
Copy Markdown
Member

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

Merge Conflict Resolution

The cherry-pick conflicted. The 5.7 branch only has 5 workflow files (coding-standards.yml, javascript-tests.yml, php-compatibility.yml, phpunit-tests.yml, test-build-processes.yml), so the majority of the original commit does not apply.

Hunks dropped because the file does not exist on 5.7 (the cherry-pick tried to create each of these as a new file; all were git rm'd):

  • .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

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

Files that conflicted textually and how they were resolved:

  • coding-standards.yml — the phpcs job conflicted because 5.7 has an extra with: php-version: '7.4' block immediately after the if:. Resolved by taking the new multi-line if: and keeping the branch's with: block. The jshint job in the same file merged cleanly.
  • javascript-tests.yml — the test-js job conflicted for the same reason (5.7 has with: disable-apparmor: true after the if:). Resolved the same way.
  • php-compatibility.yml — the php-compatibility job conflicted for the same reason (with: php-version: '7.4'). Resolved the same way.
  • phpunit-tests.yml — heavily conflicted. 5.7 has a single test-php job using reusable-phpunit-tests-v2.yml, while trunk has prepare-gutenberg, test-with-mysql, test-with-mariadb, test-with-sqlite, and a fork-only job. The file was restored from upstream/5.7 and the new condition was applied by hand to the one job in the family, test-php. All trunk-only jobs and their conditions were dropped, including the fork-only ! startsWith( github.repository, 'WordPress/' ) && github.event_name == 'pull_request' variant, which has no counterpart on this branch.
  • test-build-processes.yml — merged cleanly for the test-core-build-process job.

Intentionally left unchanged:

  • All slack-notifications and failed-workflow jobs (gated on github.event_name != 'pull_request', unaffected by this change).
  • test-build-processes.yml's test-core-build-process-macos job, whose condition is github.repository == 'WordPress/wordpress-develop' only — it is not in the || github.event_name == 'pull_request' family and was not touched by the original commit.

Verification: git diff upstream/5.7 --stat shows only the 5 files above, all under .github/workflows/. No conflict markers remain, and all 5 changed files parse as valid YAML with their expected job lists intact.

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