Skip to content

Backport: Skip pull_request triggered runs in private repos - 4.8 Branch - #12999

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

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

Conversation

@desrosj

@desrosj desrosj commented Aug 12, 2026

Copy link
Copy Markdown
Member

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

Merge Conflict Resolution

git cherry-pick was aborted because the vast majority of the workflow files touched by the
original commit do not exist on the 4.8 branch, which only has four workflow files at all:
coding-standards.yml, javascript-tests.yml, phpunit-tests.yml, and test-build-processes.yml.
The change was applied by hand to those four files instead, reusing the original commit message.

  • Skipped entirely (file does not exist on 4.8): end-to-end-tests.yml,
    javascript-type-checking.yml, performance.yml, php-compatibility.yml,
    phpstan-static-analysis.yml, test-and-zip-default-themes.yml,
    upgrade-develop-testing.yml, workflow-lint.yml. None of these workflows, or an equivalent
    of them, exist in the 4.8 branch, so there was nothing to update.
  • coding-standards.yml: updated the jshint job's if: condition to the new
    private-repo/draft/label-gated form. The slack-notifications and failed-workflow jobs are
    gated on github.event_name != 'pull_request' and were left untouched, matching the original
    commit's scope.
  • javascript-tests.yml: updated the test-js job's if: condition the same way. The
    slack-notifications and failed-workflow jobs were left untouched for the same reason as above.
  • phpunit-tests.yml: updated the test-php job's if: condition the same way. On this
    branch, test-php only uses the simple
    github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request'
    gate (the startsWith( github.repository, 'WordPress/' ) && (...) wrapper seen in trunk's
    phpunit-tests.yml for its matrix jobs does not exist on 4.8, since this branch predates the
    per-PHP-version reusable-workflow matrix split), so the canonical replacement condition was
    used as-is. The slack-notifications and failed-workflow jobs were left untouched.
  • test-build-processes.yml: updated the test-core-build-process job's if: condition the
    same way. The test-core-build-process-macos job uses a stricter, unrelated condition
    (github.repository == 'WordPress/wordpress-develop', with no pull_request allowance at all,
    to limit consumption of the higher-cost macOS runner minutes) and was intentionally left
    untouched, since it is not a member of the ... || github.event_name == 'pull_request' family
    the original commit targeted. The slack-notifications and failed-workflow jobs were left
    untouched as well.

No files outside .github/workflows/ were touched, and no file was created or deleted.

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