Skip to content

Backport: Skip pull_request triggered runs in private repos - 5.0 Branch - #13001

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

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

Conversation

@desrosj

@desrosj desrosj commented Aug 12, 2026

Copy link
Copy Markdown
Member

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

Merge Conflict Resolution

The cherry-pick conflicted because the 5.0 branch's .github/workflows/ directory predates most of the workflow files and jobs that existed on trunk at the time of the original commit. Conflicts were resolved as follows:

Files that do not exist on the 5.0 branch — dropped entirely (not created):

  • .github/workflows/end-to-end-tests.yml
  • .github/workflows/javascript-type-checking.yml
  • .github/workflows/performance.yml
  • .github/workflows/php-compatibility.yml
  • .github/workflows/phpstan-static-analysis.yml
  • .github/workflows/test-and-zip-default-themes.yml
  • .github/workflows/upgrade-develop-testing.yml (no upgrade-testing.yml-style equivalent exists on this branch either)
  • .github/workflows/workflow-lint.yml

The cherry-pick attempted to recreate each of these (git reported them as modify/delete conflicts), so each was removed with git rm to keep them out of scope for this branch.

.github/workflows/coding-standards.yml: The 5.0 branch only has the jshint job in this workflow — the phpcs job does not exist yet (PHPCS checking was introduced in WordPress 5.1, per the file's own header comment). The cherry-pick tried to add a new phpcs job carrying the updated condition; that whole job addition was dropped since it isn't part of this branch. The jshint job's if: condition was updated to the canonical replacement (this part applied cleanly, no hand-editing needed).

.github/workflows/javascript-tests.yml: The test-js job conflicted only because this branch has a with: disable-apparmor: true block that trunk no longer has. Resolved by keeping the branch's with: block and applying the updated if: condition ahead of it.

.github/workflows/phpunit-tests.yml: This branch's version of the workflow only has one test job, test-php (using reusable-phpunit-tests-v1.yml with the old PHP-only matrix and secrets: inherit), plus slack-notifications and failed-workflow. Trunk's version has since split into several additional jobs (prepare-gutenberg, test-with-mysql, test-with-mariadb, test-innovation-releases, html-api-test-groups, limited-matrix-for-forks) that do not exist on 5.0. Two conflict hunks resulted:

  • The first hunk mixed the test-php job's if: update together with the entirely new test-with-mysql job. Kept secrets: inherit and applied the canonical if: condition to test-php; dropped the test-with-mysql job addition (out of scope).
  • The second hunk appeared inside the with: block of test-php and contained trailing with: keys (tests-domain, report, gutenberg-artifact, gutenberg-sha) that belong to the newer reusable workflow version, immediately followed by the four other new jobs listed above. All of that was dropped since none of it exists on this branch; test-php's existing with: block (os, php, phpunit, multisite, split_slow, memcached, phpunit-config) was left untouched and the diff proceeds straight to the existing slack-notifications job.

.github/workflows/test-build-processes.yml: Applied cleanly with no conflicts; only the if: condition was updated.

No other files were touched. git diff upstream/5.0 --stat confirms only these four files under .github/workflows/ changed, each changed job now carries the canonical private-repo/draft-PR condition, and every changed YAML file parses successfully with PyYAML.

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