Skip to content

Backport: Skip pull_request triggered runs in private repos - 7.1 Branch - #12984

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

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

Conversation

@desrosj

@desrosj desrosj commented Aug 12, 2026

Copy link
Copy Markdown
Member

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

Merge Conflict Resolution

The cherry-pick applied cleanly to 10 of the 12 files. Two adaptations were required:

1. .github/workflows/test-and-zip-default-themes.yml — dropped entirely

This file does not exist on the 7.1 branch. It is intentionally deleted from numbered release branches by the "Post 7.1 branching changes for the 7.1 branch" commit (dfdd339309), since default theme testing/zipping is only performed on trunk. The cherry-pick reported a modify/delete conflict and left trunk's version of the file in the tree; it was removed with git rm so the file is not created on this branch. Both if: conditions the original commit changed in that file (test-and-zip-themes and the second theme job) were therefore dropped.

There is no equivalent renamed file on 7.1 — no workflow on this branch handles default theme testing or zipping.

2. uses: changes to local reusable workflow paths — not carried over

The original commit also switched three uses: references from WordPress/wordpress-develop/.github/workflows/<x>.yml@trunk to the local ./.github/workflows/<x>.yml form:

  • upgrade-develop-testing.ymlreusable-build-package.yml
  • upgrade-develop-testing.ymlreusable-upgrade-testing.yml
  • workflow-lint.ymlreusable-workflow-lint.yml

The 7.1 branch contains no reusable-*.yml files in .github/workflows/ at all — numbered branches deliberately consume the reusable workflows from trunk. Switching to a local path would break these workflows. Per the backport scope rules, these three uses: lines were reverted to their original @trunk form after the cherry-pick, and only the if: condition changes were kept in those two files.

Everything else

All remaining hunks applied without modification. No job condition had to be hand-written from scratch — every if: gate in the family github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' (including the startsWith( github.repository, 'WordPress/' ) && (...) variants, the && ! contains( github.event.before, '00000000' ) variant in performance.yml, the fork-only variant in phpunit-tests.yml, and the push-inclusive variant in upgrade-develop-testing.yml) was a clean textual match on this branch.

A post-application sweep of .github/workflows/ confirmed no jobs of that condition family remain unconverted on 7.1. Slack notification jobs (gated on github.event_name != 'pull_request') were left untouched, as were props-bot.yml, pull-request-comments.yml, cleanup-pull-requests.yml, check-built-files.yml, and local-docker-environment.yml, none of which the original commit touched.

All 16 workflow files on this branch were verified to parse as valid YAML after the change.

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