Skip to content

Backport: Skip pull_request triggered runs in private repos - 7.0 Branch - #12988

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

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

Conversation

@desrosj

@desrosj desrosj commented Aug 12, 2026

Copy link
Copy Markdown
Member

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

Merge Conflict Resolution

The cherry-pick did not apply cleanly. The following adaptations were made for the 7.0 branch:

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

This file does not exist on the 7.0 branch (it was introduced on trunk in [b71a7bf], after 7.0 was branched), so the cherry-pick reported a modify/delete conflict. The file was git rm'd rather than created, since introducing a brand new workflow is out of scope for a backport. The two hunks from the original commit that targeted its test-default-themes and zip-default-themes jobs were dropped.

.github/workflows/phpunit-tests.yml — 5 content conflicts, all resolved the same way

All five conflicts were caused by unrelated drift between trunk and 7.0 in the lines immediately adjacent to the if: gates: trunk passes secrets explicitly, while 7.0 still uses secrets: inherit.

<<<<<<< HEAD (7.0)
    secrets: inherit
=======
    secrets:
      CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
      WPT_REPORT_API_KEY: ${{ secrets.WPT_REPORT_API_KEY }}
>>>>>>> (trunk)

In every case the branch's secrets: inherit line was kept unchanged and only the new if: condition from r63183 was taken. The affected jobs are:

  • test-with-mysql

  • test-with-mariadb

  • test-innovation-releases

  • html-api-test-groups

    (the four above all use the startsWith( github.repository, 'WordPress/' ) && ( ... ) outer wrapper)

  • limited-matrix-for-forks, the fork-only job gated on ! startsWith( github.repository, 'WordPress/' ) && github.event_name == 'pull_request', which received the private/draft/label group appended directly, per the original commit.

The prepare-gutenberg job applied cleanly.

uses: changes reverted — reusable workflows do not live on this branch

The original commit also switched two workflows from uses: WordPress/wordpress-develop/.github/workflows/<x>.yml@trunk to a local uses: ./.github/workflows/<x>.yml reference. The 7.0 branch contains no reusable-*.yml files at all (verified with git ls-tree -r --name-only 7.0 .github/workflows/ | grep reusable → 0 results); every workflow on this branch consumes the reusable workflows from trunk in the canonical repo.

Applying the local references would therefore break these workflows, so the uses: lines were restored to their 7.0 values after the cherry-pick, and only the if: conditions were backported:

  • .github/workflows/upgrade-develop-testing.ymlbuild job kept uses: WordPress/wordpress-develop/.github/workflows/reusable-build-package.yml@trunk; upgrade-tests-develop-forks job kept uses: WordPress/wordpress-develop/.github/workflows/reusable-upgrade-testing.yml@trunk.
  • .github/workflows/workflow-lint.ymllint job kept uses: WordPress/wordpress-develop/.github/workflows/reusable-workflow-lint.yml@trunk.

The if: changes for those three jobs (including the # This job also runs for the push event, which has no draft state to check. comment on upgrade-tests-develop-forks) were applied in full.

Applied cleanly, no adaptation needed

coding-standards.yml (2 jobs), end-to-end-tests.yml, javascript-tests.yml, javascript-type-checking.yml, performance.yml (determine-matrix, including the ! contains( github.event.before, '00000000' ) clause), php-compatibility.yml, phpstan-static-analysis.yml, test-build-processes.yml.

Verification

  • git diff 7.0 --stat touches only files under .github/workflows/ (11 files).
  • No conflict markers remain.
  • All 16 workflow files on the branch parse as valid YAML.
  • A sweep for any remaining github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' style gate in the touched files returns nothing. Slack notification jobs (gated on github.event_name != 'pull_request') and untouched workflows (props-bot.yml, pull-request-comments.yml, check-built-files.yml, cleanup-pull-requests.yml, local-docker-environment.yml) were left alone.

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