Skip to content

Prevent workflow jobs from running within forks on push. - #85968

Merged
desrosj merged 3 commits into
WordPress:trunkfrom
desrosj:fix/gate-fork-push-jobs
Nov 4, 2026
Merged

desrosj merged 3 commits into
WordPress:trunkfrom
desrosj:fix/gate-fork-push-jobs

Conversation

@desrosj

@desrosj desrosj commented Oct 29, 2026 •

Copy link
Copy Markdown
Member

What?

This adds or refines the conditions defined for some GitHub Actions workflow jobs to prevent them from running on push events to forks or private mirrors.

Previously: #32114, #32494, #32821.

This will need to be backported through all wp/X.Y branches.

Why?

Because individual concurrent job limits are much lower than the WordPress organization's and there private workflow runs consume minutes at a cost, forks and private mirrors should only run workflows when there is intention. Syncing a fork triggers a push event, but there is no need or intention to run workflows. Instead, they should only run for pull_request by default.

Use of AI Tools

Original PR drafted with Claude and reviewed/modified by me.

@desrosj
desrosj requested a balanced review from Copilot October 29, 2026 19:15
@desrosj desrosj self-assigned this Oct 29, 2026
@desrosj desrosj added [Type] Build Tooling Issues or PRs related to build tooling GitHub Actions Pull requests that update GitHub Actions code labels Oct 29, 2026
@desrosj desrosj moved this from Backlog to In review in WordPress Project Build Tooling Oct 29, 2026
@github-actions

github-actions Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

🤖 PR meta 🤖

Preview in WordPress Playground

🎉 Props

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: desrosj <desrosj@git.wordpress.org>
Co-authored-by: lucatume <lucatume@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.


Props Bot commands

You can trigger Props Bot actions by commenting on this PR:

  • @propsbot add <username> to give props to a GitHub user. Requires write access.
  • @propsbot remove <username> to leave a user out of the props. Requires write access.
  • @propsbot refresh to refresh this list. Adding the props-bot label works too.

Updated as activity occurs, without notifying anyone named here. Add the props-bot label to refresh.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues are reported for the workflow restriction changes.

No open issues 🎉

What changed in this PR

This PR extends existing GitHub Actions restrictions to avoid unnecessary jobs when forks or private mirrors receive pushes, while retaining pull-request eligibility for unit and end-to-end testing.

Changes:

  • Gate unit and end-to-end change detection by repository or pull-request event.
  • Restrict performance change detection to WordPress/gutenberg.
  • Tighten conditions for unit-test preparation and end-to-end artifact merging.
File Description
.github/​workflows/​unit-test.yml Adds repository and event guards to change detection and PHP test preparation.
.github/​workflows/​performance.yml Limits change detection to the upstream repository.
.github/​workflows/​end2end-test.yml Guards change detection and artifact merging against fork pushes.

Review effort: Balanced

@desrosj
desrosj requested a review from a team November 2, 2026 16:41
@desrosj desrosj added the props-bot Manually triggers Props Bot to ensure the list of props is up to date. label Nov 4, 2026
@github-actions github-actions Bot removed the props-bot Manually triggers Props Bot to ensure the list of props is up to date. label Nov 4, 2026
@desrosj
desrosj merged commit 572b44d into WordPress:trunk Nov 4, 2026
90 checks passed
@desrosj
desrosj deleted the fix/gate-fork-push-jobs branch November 4, 2026 16:45
@github-project-automation github-project-automation Bot moved this from In review to Done in WordPress Project Build Tooling Nov 4, 2026
@desrosj desrosj added the Backport to WP 7.2 Beta/RC Pull request that needs to be backported to the WordPress major release that's currently in beta label Nov 4, 2026
@github-actions github-actions Bot added this to the Gutenberg 24.5 milestone Nov 4, 2026
@Mamaduka Mamaduka added Backported to WP Core Pull request that has been successfully merged into WP Core and removed Backport to WP 7.2 Beta/RC Pull request that needs to be backported to the WordPress major release that's currently in beta labels Nov 10, 2026
Mamaduka pushed a commit that referenced this pull request Nov 10, 2026
Co-authored-by: desrosj <desrosj@git.wordpress.org>
Co-authored-by: lucatume <lucatume@git.wordpress.org>
wporg-sync pushed a commit to WordPress/wordpress-develop that referenced this pull request Nov 10, 2026
This updates the pinned commit hash of the Gutenberg repository from `c035c1a649ef68f5c1646694cf440df1d7ae6e62` to `1b0dc90c700746b108e080263a4dc67707b750a1` (fixes cherry-picked to the `wp/7.2` branch).

A full list of changes included in this commit can be found on GitHub: WordPress/gutenberg@c035c1a...1b0dc90

- [WP 7.2] Components, UI: Use focus-visible for disabled item focus rings (WordPress/gutenberg#86269)
- Notes: Keep the canvas still when a new note is added (WordPress/gutenberg#86283) (#86293)
- Post summary: Show placeholders for an empty excerpt and a missing author (WordPress/gutenberg#85842) (#86294)
- Core fields: Restore the previous Publish and Status panel date behaviour (WordPress/gutenberg#86065) (#86295)
- Interactivity API: Show the data-wp-html fallback on created elements under Trusted Types (WordPress/gutenberg#84924) (#86306)
- [WP 7.2] UI: Add LoadingIndicator to item popups (WordPress/gutenberg#86303)
- Interactivity Router: Fix nested router regions without data-wp-interactive disappearing on navigation (WordPress/gutenberg#86061) (#86308)
- Interactivity API: Run watch() cleanups and attachTo render callbacks without a directive scope (WordPress/gutenberg#86058) (#86311)
- DataForm: Fix clipped focus ring of field values in panel layout (WordPress/gutenberg#86361) (#86369)
- Tests: Avoid passing an object when invoking static methods via reflection. (WordPress/gutenberg#86329)
- [WP 7.2] DropdownMenu: Invert the selected item indicator while highlighted (WordPress/gutenberg#86379)
- Fields: Lowercase the (no excerpt), (no author) and (no description) placeholders (WordPress/gutenberg#86391) (#86424)
- Core fields: Decode non-Latin slugs in the slug field (WordPress/gutenberg#86359)
- Interactivity API: Show the new page's server content in kept data-wp-html elements (WordPress/gutenberg#86416)
- DataForm: Tighten value density in the panel layout (WordPress/gutenberg#86389) (#86426)
- Post summary: Show "Immediately" and relative publish dates in the Date row (WordPress/gutenberg#86367)
- [WP 7.2] Block Styles: Show the active style variation in forced colors mode (WordPress/gutenberg#86450)
- Site Editor: Fix the frame snapping to the mobile width when resized with the mouse (WordPress/gutenberg#86423)
- Image: measure the lightbox container, not the image's parent (WordPress/gutenberg#82312) (#85491)
- URL: Decode percent-encoded characters in getFilename (WordPress/gutenberg#86422) (#86477)
- Fix: Hide the author avatar when the site does not show avatars and frame a blank one. (WordPress/gutenberg#86395)
- Date picker: Mark the posts of the month a typed or reset date moves to (WordPress/gutenberg#86298) (#86463)
- Fix iOS 27 tap into a heading leaving the caret in a quote (WordPress/gutenberg#85809)
- Hand focus back to the field on a press in every browser (WordPress/gutenberg#86549)
- Prevent jobs from running within forks on `push`. (WordPress/gutenberg#85968)
- i18n: Add translator context to the "Copy error" button label (WordPress/gutenberg#85967)
- Bubble editor canvas events to the outer iframe (WordPress/gutenberg#85263)
- UI: Use LoadingIndicator in remaining popup consumers (WordPress/gutenberg#86501)
- Block Editor: Keep the revision canvas read-only in preview mode (WordPress/gutenberg#84578)
- Core Data: Rank an exact title match first among tied link suggestions (WordPress/gutenberg#86327)
- Tests: Render the router-html-server context case through state (WordPress/gutenberg#86511)
- iOS tests: De-flake the selection handle test (WordPress/gutenberg#85461)

Props mamaduka, wildworks.
See #66340.

git-svn-id: https://develop.svn.wordpress.org/trunk@65379 602fd350-edb4-49c9-b593-d223f7449a82
wporg-sync pushed a commit to WordPress/WordPress that referenced this pull request Nov 10, 2026
This updates the pinned commit hash of the Gutenberg repository from `c035c1a649ef68f5c1646694cf440df1d7ae6e62` to `1b0dc90c700746b108e080263a4dc67707b750a1` (fixes cherry-picked to the `wp/7.2` branch).

A full list of changes included in this commit can be found on GitHub: WordPress/gutenberg@c035c1a...1b0dc90

- [WP 7.2] Components, UI: Use focus-visible for disabled item focus rings (WordPress/gutenberg#86269)
- Notes: Keep the canvas still when a new note is added (WordPress/gutenberg#86283) (#86293)
- Post summary: Show placeholders for an empty excerpt and a missing author (WordPress/gutenberg#85842) (#86294)
- Core fields: Restore the previous Publish and Status panel date behaviour (WordPress/gutenberg#86065) (#86295)
- Interactivity API: Show the data-wp-html fallback on created elements under Trusted Types (WordPress/gutenberg#84924) (#86306)
- [WP 7.2] UI: Add LoadingIndicator to item popups (WordPress/gutenberg#86303)
- Interactivity Router: Fix nested router regions without data-wp-interactive disappearing on navigation (WordPress/gutenberg#86061) (#86308)
- Interactivity API: Run watch() cleanups and attachTo render callbacks without a directive scope (WordPress/gutenberg#86058) (#86311)
- DataForm: Fix clipped focus ring of field values in panel layout (WordPress/gutenberg#86361) (#86369)
- Tests: Avoid passing an object when invoking static methods via reflection. (WordPress/gutenberg#86329)
- [WP 7.2] DropdownMenu: Invert the selected item indicator while highlighted (WordPress/gutenberg#86379)
- Fields: Lowercase the (no excerpt), (no author) and (no description) placeholders (WordPress/gutenberg#86391) (#86424)
- Core fields: Decode non-Latin slugs in the slug field (WordPress/gutenberg#86359)
- Interactivity API: Show the new page's server content in kept data-wp-html elements (WordPress/gutenberg#86416)
- DataForm: Tighten value density in the panel layout (WordPress/gutenberg#86389) (#86426)
- Post summary: Show "Immediately" and relative publish dates in the Date row (WordPress/gutenberg#86367)
- [WP 7.2] Block Styles: Show the active style variation in forced colors mode (WordPress/gutenberg#86450)
- Site Editor: Fix the frame snapping to the mobile width when resized with the mouse (WordPress/gutenberg#86423)
- Image: measure the lightbox container, not the image's parent (WordPress/gutenberg#82312) (#85491)
- URL: Decode percent-encoded characters in getFilename (WordPress/gutenberg#86422) (#86477)
- Fix: Hide the author avatar when the site does not show avatars and frame a blank one. (WordPress/gutenberg#86395)
- Date picker: Mark the posts of the month a typed or reset date moves to (WordPress/gutenberg#86298) (#86463)
- Fix iOS 27 tap into a heading leaving the caret in a quote (WordPress/gutenberg#85809)
- Hand focus back to the field on a press in every browser (WordPress/gutenberg#86549)
- Prevent jobs from running within forks on `push`. (WordPress/gutenberg#85968)
- i18n: Add translator context to the "Copy error" button label (WordPress/gutenberg#85967)
- Bubble editor canvas events to the outer iframe (WordPress/gutenberg#85263)
- UI: Use LoadingIndicator in remaining popup consumers (WordPress/gutenberg#86501)
- Block Editor: Keep the revision canvas read-only in preview mode (WordPress/gutenberg#84578)
- Core Data: Rank an exact title match first among tied link suggestions (WordPress/gutenberg#86327)
- Tests: Render the router-html-server context case through state (WordPress/gutenberg#86511)
- iOS tests: De-flake the selection handle test (WordPress/gutenberg#85461)

Props mamaduka, wildworks.
See #66340.
Built from https://develop.svn.wordpress.org/trunk@65379


git-svn-id: http://core.svn.wordpress.org/trunk@64518 1a063a9b-81f0-0310-95a4-ce76da25c4cd
arshidkv12 pushed a commit to arshidkv12/wordpress-develop that referenced this pull request Nov 21, 2026
This updates the pinned commit hash of the Gutenberg repository from `c035c1a649ef68f5c1646694cf440df1d7ae6e62` to `1b0dc90c700746b108e080263a4dc67707b750a1` (fixes cherry-picked to the `wp/7.2` branch).

A full list of changes included in this commit can be found on GitHub: WordPress/gutenberg@c035c1a...1b0dc90

- [WP 7.2] Components, UI: Use focus-visible for disabled item focus rings (WordPress/gutenberg#86269)
- Notes: Keep the canvas still when a new note is added (WordPress/gutenberg#86283) (#86293)
- Post summary: Show placeholders for an empty excerpt and a missing author (WordPress/gutenberg#85842) (#86294)
- Core fields: Restore the previous Publish and Status panel date behaviour (WordPress/gutenberg#86065) (#86295)
- Interactivity API: Show the data-wp-html fallback on created elements under Trusted Types (WordPress/gutenberg#84924) (#86306)
- [WP 7.2] UI: Add LoadingIndicator to item popups (WordPress/gutenberg#86303)
- Interactivity Router: Fix nested router regions without data-wp-interactive disappearing on navigation (WordPress/gutenberg#86061) (#86308)
- Interactivity API: Run watch() cleanups and attachTo render callbacks without a directive scope (WordPress/gutenberg#86058) (#86311)
- DataForm: Fix clipped focus ring of field values in panel layout (WordPress/gutenberg#86361) (#86369)
- Tests: Avoid passing an object when invoking static methods via reflection. (WordPress/gutenberg#86329)
- [WP 7.2] DropdownMenu: Invert the selected item indicator while highlighted (WordPress/gutenberg#86379)
- Fields: Lowercase the (no excerpt), (no author) and (no description) placeholders (WordPress/gutenberg#86391) (#86424)
- Core fields: Decode non-Latin slugs in the slug field (WordPress/gutenberg#86359)
- Interactivity API: Show the new page's server content in kept data-wp-html elements (WordPress/gutenberg#86416)
- DataForm: Tighten value density in the panel layout (WordPress/gutenberg#86389) (#86426)
- Post summary: Show "Immediately" and relative publish dates in the Date row (WordPress/gutenberg#86367)
- [WP 7.2] Block Styles: Show the active style variation in forced colors mode (WordPress/gutenberg#86450)
- Site Editor: Fix the frame snapping to the mobile width when resized with the mouse (WordPress/gutenberg#86423)
- Image: measure the lightbox container, not the image's parent (WordPress/gutenberg#82312) (#85491)
- URL: Decode percent-encoded characters in getFilename (WordPress/gutenberg#86422) (#86477)
- Fix: Hide the author avatar when the site does not show avatars and frame a blank one. (WordPress/gutenberg#86395)
- Date picker: Mark the posts of the month a typed or reset date moves to (WordPress/gutenberg#86298) (#86463)
- Fix iOS 27 tap into a heading leaving the caret in a quote (WordPress/gutenberg#85809)
- Hand focus back to the field on a press in every browser (WordPress/gutenberg#86549)
- Prevent jobs from running within forks on `push`. (WordPress/gutenberg#85968)
- i18n: Add translator context to the "Copy error" button label (WordPress/gutenberg#85967)
- Bubble editor canvas events to the outer iframe (WordPress/gutenberg#85263)
- UI: Use LoadingIndicator in remaining popup consumers (WordPress/gutenberg#86501)
- Block Editor: Keep the revision canvas read-only in preview mode (WordPress/gutenberg#84578)
- Core Data: Rank an exact title match first among tied link suggestions (WordPress/gutenberg#86327)
- Tests: Render the router-html-server context case through state (WordPress/gutenberg#86511)
- iOS tests: De-flake the selection handle test (WordPress/gutenberg#85461)

Props mamaduka, wildworks.
See #66340.

git-svn-id: https://develop.svn.wordpress.org/trunk@65379 602fd350-edb4-49c9-b593-d223f7449a82
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Backported to WP Core Pull request that has been successfully merged into WP Core GitHub Actions Pull requests that update GitHub Actions code [Type] Build Tooling Issues or PRs related to build tooling

Projects

Development

Successfully merging this pull request may close these issues.

4 participants