Skip to content

Backport: Skip pull_request triggered runs in private repos - 6.9 Branch - #12985

Draft
desrosj wants to merge 2 commits into
WordPress:6.9from
desrosj:backport/6.9-branch-63183
Draft

Backport: Skip pull_request triggered runs in private repos - 6.9 Branch#12985
desrosj wants to merge 2 commits into
WordPress:6.9from
desrosj:backport/6.9-branch-63183

Conversation

@desrosj

@desrosj desrosj commented Aug 12, 2026

Copy link
Copy Markdown
Member

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

Merge Conflict Resolution

The cherry-pick conflicted. Details of every adaptation:

Files from the original commit that do not exist on 6.9 (hunks dropped entirely)

These three workflow files were reported as modify/delete conflicts (deleted in HEAD, modified by the cherry-pick). The cherry-pick left the trunk version in the tree; each was git rm'd because the file does not exist on this branch and has no differently-named equivalent here:

  • .github/workflows/javascript-type-checking.yml
  • .github/workflows/phpstan-static-analysis.yml
  • .github/workflows/test-and-zip-default-themes.yml

.github/workflows/phpunit-tests.yml (content conflict, 6 hunks)

  • prepare-gutenberg job — dropped. Trunk added the new if: to a prepare-gutenberg job that calls reusable-prepare-gutenberg.yml. That job does not exist on 6.9, so the hunk was dropped rather than introducing a new job.
  • secrets: blocks — kept the 6.9 version. Trunk lists CODECOV_TOKEN / WPT_REPORT_API_KEY explicitly; 6.9 uses secrets: inherit. secrets: inherit was preserved unchanged in all five jobs — only the if: expression was replaced.
  • The new condition was applied to test-with-mysql, test-with-mariadb, test-innovation-releases, html-api-test-groups (all startsWith( github.repository, 'WordPress/' ) && ( ... ) shape) and to limited-matrix-for-forks (the fork-only ! startsWith( ... ) && github.event_name == 'pull_request' shape).

uses: changes reverted (out of scope for this branch)

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. The 6.9 branch contains no reusable-*.yml workflow files at all, so those local paths would not resolve. All three were reverted to the @trunk form; only the if: conditions were carried over:

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

Applied cleanly (no adaptation needed)

coding-standards.yml (2 jobs), end-to-end-tests.yml, javascript-tests.yml, performance.yml (determine-matrix, including the ! contains( github.event.before, '00000000' ) clause), php-compatibility.yml, test-build-processes.yml, workflow-lint.yml (if: only), and upgrade-develop-testing.yml (if: only).

Verification

  • git diff upstream/6.9 --stat touches only .github/workflows/ (9 files).
  • No conflict markers remain (git grep -E '^(<<<<<<<|=======|>>>>>>>)' -- .github returns nothing).
  • All 9 changed YAML files parse successfully with PyYAML.
  • Every if: gate of the affected family on 6.9 was audited via grep; no job in the in-scope files was missed. Slack-notification jobs and workflows the original commit did not touch (check-built-files.yml, cleanup-pull-requests.yml, local-docker-environment.yml, props-bot.yml, pull-request-comments.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