Skip to content

CI: Do not run build-plugin-zip when PR metadata changes#841

Closed
yogeshbhutkar wants to merge 1 commit into
WordPress:developfrom
yogeshbhutkar:ci/build-plugin-zip
Closed

CI: Do not run build-plugin-zip when PR metadata changes#841
yogeshbhutkar wants to merge 1 commit into
WordPress:developfrom
yogeshbhutkar:ci/build-plugin-zip

Conversation

@yogeshbhutkar

@yogeshbhutkar yogeshbhutkar commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

What, Why, and How?

While working on other PRs, I noticed that build-plugin-zip reruns for PR metadata-only changes, such as title or description edits. Each run takes about three minutes, and since the generated artifact depends on the PR code rather than PR metadata, repeated edits can waste CI time. This change limits the workflow to code-relevant PR events (opened, synchronize, and reopened), matching Gutenberg’s corresponding workflow, which uses the default pull_request activity types.

P.S. edited also runs when the PR base branch changes. If we decide that base-branch changes should still rebuild the plugin ZIP (which I don't think is required), we can keep edited and add an if guard so only that specific edit path triggers the workflow.

Use of AI Tools

AI assistance: Yes
Tool(s): Codex
Model(s): GPT-5.5
Used for: Code review

Testing Instructions

  • CI should be green.
  • Changing PR metadata should not trigger build-plugin-zip.

Changelog Entry

Fixed - Prevent unnecessary plugin ZIP rebuilds when a pull request metadata is edited

Open WordPress Playground Preview

@codecov

codecov Bot commented Jul 7, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 75.50%. Comparing base (30fc728) to head (a5bcb0e).

Additional details and impacted files
@@            Coverage Diff             @@
##             develop     #841   +/-   ##
==========================================
  Coverage      75.50%   75.50%           
  Complexity      2086     2086           
==========================================
  Files             99       99           
  Lines           8626     8626           
==========================================
  Hits            6513     6513           
  Misses          2113     2113           
Flag Coverage Δ
unit 75.50% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@yogeshbhutkar yogeshbhutkar marked this pull request as ready for review July 7, 2026 06:52
@yogeshbhutkar yogeshbhutkar requested a review from a team July 7, 2026 06:52
@github-actions

github-actions Bot commented Jul 7, 2026

Copy link
Copy Markdown

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

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: yogeshbhutkar <yogeshbhutkar@git.wordpress.org>

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

@yogeshbhutkar yogeshbhutkar changed the title CI: Do not run build-plugin-zip on edited PR Type CI: Do not run build-plugin-zip when PR metadata changes Jul 7, 2026

@dkotter dkotter 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.

I'm open to thoughts here but this workflow is intentionally run on the edited flow as the purpose of this workflow is to build a final plugin zip which then triggers our PR Playground Preview workflow.

That workflow will add a link to the PR description that will open that PR in a Playground instance. That workflow uses the WordPress Playground PR Preview Action and it recommends using the edited action. The main reason for that is if someone edits the PR and removes the Playground link, the workflow will automatically trigger and add it back.

@yogeshbhutkar

Copy link
Copy Markdown
Contributor Author

This makes sense to me. Thank you for your time. Closing this PR as this is a calculated decision.

@yogeshbhutkar yogeshbhutkar deleted the ci/build-plugin-zip branch July 8, 2026 05:31
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.

2 participants