Skip to content

Backport: Skip pull_request triggered runs in private repos - 6.3 Branch - #12990

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

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

Conversation

@desrosj

@desrosj desrosj commented Aug 12, 2026

Copy link
Copy Markdown
Member

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

Merge Conflict Resolution

The cherry-pick conflicted because the 6.3 branch has a much smaller and older set of workflow files than trunk. All resolutions were confined to .github/workflows/.

Jobs updated (7 jobs across 6 files)

The canonical replacement condition was applied to every job on this branch whose gate was if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }}:

  • coding-standards.ymlphpcs, jshint
  • end-to-end-tests.ymle2e-tests
  • javascript-tests.ymltest-js
  • php-compatibility.ymlphp-compatibility
  • phpunit-tests.ymltest-php
  • test-build-processes.ymltest-core-build-process

None of these jobs exist on 6.3 in the startsWith( github.repository, 'WordPress/' ) && ( ... ) wrapped form used on trunk, so the plain (unwrapped) canonical condition was used for all of them.

Conflicts and how they were resolved

  • coding-standards.yml (phpcs) and php-compatibility.yml (php-compatibility) — content conflicts. On 6.3 these jobs have a with: php-version: '7.4' block immediately after the if: key, which trunk no longer has. Resolved by taking the new multi-line if: from the cherry-pick and re-appending the branch's existing with: php-version: '7.4' block below it. No other changes to these jobs.
  • phpunit-tests.yml — content conflict. The incoming change wanted to add the prepare-gutenberg job and rewrite test-php to use secrets: CODECOV_TOKEN / WPT_REPORT_API_KEY, plus pull in the test-with-mariadb / test-with-sqlite / fork-specific jobs, none of which exist on 6.3. Resolved by restoring the branch's version of the file in full and hand-applying only the new if: condition to the single test-php job. The branch's secrets: inherit line and the rest of the job were left untouched. No new jobs were introduced.
  • end-to-end-tests.yml, javascript-tests.yml, test-build-processes.yml — auto-merged cleanly; no manual intervention.

Hunks dropped (file does not exist on 6.3)

These files from the original commit do not exist on this branch, so their hunks were dropped and the files were git rm'd from the cherry-pick so they are not created here:

  • javascript-type-checking.yml
  • performance.yml
  • phpstan-static-analysis.yml
  • test-and-zip-default-themes.yml
  • upgrade-develop-testing.yml (no equivalent upgrade-testing.yml exists on 6.3 either)
  • workflow-lint.yml

Other pieces of the original commit intentionally not carried over

  • The uses: WordPress/wordpress-develop/.github/workflows/<x>.yml@trunkuses: ./.github/workflows/<x>.yml switch applied only to upgrade-develop-testing.yml and workflow-lint.yml, neither of which exists on 6.3. Skipped.
  • test-build-processes.ymltest-core-build-process-macos was not changed. It is gated on if: ${{ github.repository == 'WordPress/wordpress-develop' }} only, which is not part of the condition family this commit modifies (it already never runs in forks or mirrors), and the equivalent job was not touched by the original commit.
  • The slack-notifications and failed-workflow jobs in all six files were left untouched, as they are gated on github.event_name != 'pull_request' and are unaffected.
  • welcome-new-contributors.yml was not touched.

Verification performed

  • git diff upstream/6.3 --stat shows only the six files above (56 insertions, 7 deletions).
  • No conflict markers remain anywhere under .github.
  • All six changed workflow files parse as valid YAML, and each job's resolved if: expression was dumped and inspected to confirm correct structure and indentation.

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