-
Notifications
You must be signed in to change notification settings - Fork 10.8k
Label PRs merged after Feature Freeze #60250
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: trunk
Are you sure you want to change the base?
Label PRs merged after Feature Freeze #60250
Conversation
6fab5bb
to
225f0ba
Compare
Testing GuidelinesHi @joshuatf @woocommerce/flux, Apart from reviewing the code changes, please make sure to review the testing instructions (Guide) and verify that relevant tests (E2E, Unit, Integration, etc.) have been added or updated as needed. Reminder: PR reviewers are required to document testing performed. This includes:
|
📝 WalkthroughWalkthroughThis update introduces and standardizes the use of the "Release" and "metric: post feature freeze" labels in workflows and utility scripts. It adds label management to GitHub Actions for merged PRs, updates label handling in release and changelog automation, and adjusts trend analysis queries to use the new label. Changes
Sequence Diagram(s)sequenceDiagram
participant Workflow as GitHub Workflow
participant GH_CLI as GitHub CLI
participant PR as Pull Request
Workflow->>GH_CLI: Create PR (with --label Release)
GH_CLI->>PR: PR created with "Release" label
Note over Workflow,PR: On PR merge to release/* without "Release" label
Workflow->>GH_CLI: Add "metric: post feature freeze" label to PR
GH_CLI->>PR: PR labeled with "metric: post feature freeze"
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Note ⚡️ Unit Test Generation is now available in beta!Learn more here, or try it out under "Finishing Touches" below. 📜 Recent review detailsConfiguration used: .coderabbit.yml 📒 Files selected for processing (5)
✅ Files skipped from review due to trivial changes (1)
🚧 Files skipped from review as they are similar to previous changes (4)
✨ Finishing Touches
🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
📜 Review details
Configuration used: .coderabbit.yml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (6)
.github/workflows/pull-request-post-merge-processing.yml
(1 hunks).github/workflows/release-bump-version.yml
(1 hunks).github/workflows/release-compile-changelog.yml
(1 hunks).github/workflows/release-trends-analysis.yml
(3 hunks)tools/monorepo-utils/src/code-freeze/commands/changelog/lib/index.ts
(5 hunks)tools/monorepo-utils/src/core/github/repo.ts
(1 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
**/*.{php,js,jsx,ts,tsx}
📄 CodeRabbit Inference Engine (.cursor/rules/code-quality.mdc)
**/*.{php,js,jsx,ts,tsx}
: Guard against unexpected inputs
Sanitize and validate any potentially dangerous inputs
Ensure code is backwards compatible
Write code that is readable and intuitive
Ensure code has unit or E2E tests where applicable
Files:
tools/monorepo-utils/src/core/github/repo.ts
tools/monorepo-utils/src/code-freeze/commands/changelog/lib/index.ts
**/*.{php,js,ts,jsx,tsx}
⚙️ CodeRabbit Configuration File
**/*.{php,js,ts,jsx,tsx}
: Don't trust that extension developers will follow the best practices, make sure the code:
- Guards against unexpected inputs.
- Sanitizes and validates any potentially dangerous inputs.
- Is backwards compatible.
- Is readable and intuitive.
- Has unit or E2E tests where applicable.
Files:
tools/monorepo-utils/src/core/github/repo.ts
tools/monorepo-utils/src/code-freeze/commands/changelog/lib/index.ts
🧠 Learnings (6)
📓 Common learnings
Learnt from: CR
PR: woocommerce/woocommerce#0
File: .cursor/rules/generate-pr-description.mdc:0-0
Timestamp: 2025-07-21T05:22:46.426Z
Learning: Provide clear, step-by-step instructions for how to test the changes in the PR description.
Learnt from: jorgeatorres
PR: woocommerce/woocommerce#59675
File: .github/workflows/release-bump-as-requirement.yml:48-65
Timestamp: 2025-07-15T15:39:21.856Z
Learning: In WooCommerce core repository, changelog entries for all PRs live in `plugins/woocommerce/changelog/` directory and are processed during releases, not at the repository root level.
Learnt from: prettyboymp
PR: woocommerce/woocommerce#59048
File: .github/workflows/cherry-pick-milestoned-prs.yml:118-131
Timestamp: 2025-07-11T13:05:08.440Z
Learning: In GitHub Actions workflows, when reviewing steps that access event data like `github.event.pull_request.milestone`, check the entire job dependency chain and conditional logic. If upstream jobs already validate the data exists (like checking `github.event.pull_request.milestone != null` in a prerequisite job), then downstream jobs don't need redundant null-checks since the data is guaranteed to exist by that point.
Learnt from: CR
PR: woocommerce/woocommerce#0
File: .cursor/rules/generate-pr-description.mdc:0-0
Timestamp: 2025-07-21T05:22:46.426Z
Learning: Applies to .github/PULL_REQUEST_TEMPLATE.md : The changelog section in the PR description must keep the markdown structure from the PR template exactly as-is, including all checkboxes, comments, and headings. Only the appropriate checkbox may be checked, and the changelog message must be placed under the `#### Comment` heading and before the closing `</details>` tag. Do not add, remove, or reformat any part of the changelog section except for checking the box and adding the message in the correct place.
Learnt from: CR
PR: woocommerce/woocommerce#0
File: .cursor/rules/generate-pr-description.mdc:0-0
Timestamp: 2025-07-21T05:22:46.426Z
Learning: Applies to .github/PULL_REQUEST_TEMPLATE.md : Preserve required markdown sections in the PR description, especially those used by automation (e.g., changelog entry details and comments). Do not remove or alter them.
📚 Learning: applies to .github/pull_request_template.md : the changelog section in the pr description must keep ...
Learnt from: CR
PR: woocommerce/woocommerce#0
File: .cursor/rules/generate-pr-description.mdc:0-0
Timestamp: 2025-07-21T05:22:46.426Z
Learning: Applies to .github/PULL_REQUEST_TEMPLATE.md : The changelog section in the PR description must keep the markdown structure from the PR template exactly as-is, including all checkboxes, comments, and headings. Only the appropriate checkbox may be checked, and the changelog message must be placed under the `#### Comment` heading and before the closing `</details>` tag. Do not add, remove, or reformat any part of the changelog section except for checking the box and adding the message in the correct place.
Applied to files:
.github/workflows/release-compile-changelog.yml
.github/workflows/release-trends-analysis.yml
tools/monorepo-utils/src/code-freeze/commands/changelog/lib/index.ts
📚 Learning: applies to .github/pull_request_template.md : preserve required markdown sections in the pr descript...
Learnt from: CR
PR: woocommerce/woocommerce#0
File: .cursor/rules/generate-pr-description.mdc:0-0
Timestamp: 2025-07-21T05:22:46.426Z
Learning: Applies to .github/PULL_REQUEST_TEMPLATE.md : Preserve required markdown sections in the PR description, especially those used by automation (e.g., changelog entry details and comments). Do not remove or alter them.
Applied to files:
.github/workflows/release-compile-changelog.yml
.github/workflows/release-trends-analysis.yml
.github/workflows/pull-request-post-merge-processing.yml
tools/monorepo-utils/src/code-freeze/commands/changelog/lib/index.ts
📚 Learning: in github actions workflows, when reviewing steps that access event data like `github.event.pull_req...
Learnt from: prettyboymp
PR: woocommerce/woocommerce#59048
File: .github/workflows/cherry-pick-milestoned-prs.yml:118-131
Timestamp: 2025-07-11T13:05:08.440Z
Learning: In GitHub Actions workflows, when reviewing steps that access event data like `github.event.pull_request.milestone`, check the entire job dependency chain and conditional logic. If upstream jobs already validate the data exists (like checking `github.event.pull_request.milestone != null` in a prerequisite job), then downstream jobs don't need redundant null-checks since the data is guaranteed to exist by that point.
Applied to files:
.github/workflows/release-trends-analysis.yml
.github/workflows/pull-request-post-merge-processing.yml
📚 Learning: when the user requests a pr description, always provide the output in markdown format, using the str...
Learnt from: CR
PR: woocommerce/woocommerce#0
File: .cursor/rules/generate-pr-description.mdc:0-0
Timestamp: 2025-07-21T05:22:46.426Z
Learning: When the user requests a PR description, always provide the output in markdown format, using the structure and sections from the PR template. The output should be copy-paste ready for a GitHub PR and must include all required sections unless the user specifies otherwise. Do not provide plain text or summary—always provide the markdown-formatted PR template filled out with the relevant details from the change, following these rules strictly.
Applied to files:
.github/workflows/release-trends-analysis.yml
📚 Learning: branch names should follow the structure: 'release/{version}' for release branches....
Learnt from: CR
PR: woocommerce/woocommerce#0
File: .cursor/rules/git.mdc:0-0
Timestamp: 2025-07-18T14:54:55.592Z
Learning: Branch names should follow the structure: 'release/{version}' for release branches.
Applied to files:
.github/workflows/release-bump-version.yml
🧬 Code Graph Analysis (1)
tools/monorepo-utils/src/code-freeze/commands/changelog/lib/index.ts (1)
tools/monorepo-utils/src/code-freeze/commands/changelog/types.ts (1)
Options
(1-10)
🔇 Additional comments (8)
.github/workflows/release-bump-version.yml (1)
173-174
: LGTM! Correct implementation of Release label requirement.The addition of
--label Release
properly implements the PR objective to label automatically generated release PRs with the "Release" label for better tracking and categorization..github/workflows/release-trends-analysis.yml (2)
18-18
: LGTM! Correct label update for CFEs analysis.The label filter correctly changes from "metric: code freeze exception" to "metric: post feature freeze" to align with the new labeling scheme introduced in this PR.
66-66
: LGTM! Consistent label update for quality analysis.The label filter is consistently updated to use "metric: post feature freeze" across all analysis jobs, maintaining functionality while aligning with the new labeling system.
.github/workflows/pull-request-post-merge-processing.yml (1)
60-73
: LGTM! Correctly implements post-feature-freeze labeling logic.The new job properly implements the PR objective to label non-Release PRs merged into release branches with "metric: post feature freeze". The conditional logic correctly identifies the target scenarios and the GitHub CLI usage is appropriate.
tools/monorepo-utils/src/code-freeze/commands/changelog/lib/index.ts (4)
15-18
: LGTM!The import addition is necessary for the new PR labeling functionality and follows the existing import pattern.
186-190
: LGTM!The PR labeling logic correctly adds the "Release" label after PR creation. The try-catch block appropriately handles labeling failures as non-critical errors, ensuring the main changelog workflow continues even if labeling fails.
210-210
: LGTM!The return type changes are consistent and well-documented. Updating both
updateBranchChangelog
andupdateTrunkChangelog
to return PR numbers allows callers to access the created PR number for further processing. The JSDoc comment is properly updated to reflect the new behavior.Also applies to: 217-217, 272-272, 303-303
266-270
: LGTM!The PR labeling logic is consistent with the implementation in
updateReleaseBranchChangelogs
. It correctly adds the "Release" label after PR creation and handles failures gracefully as non-critical errors.
225f0ba
to
ec3a26c
Compare
Changes proposed in this Pull Request:
This PR introduces changes to workflows and changelog utils in order to ensure that any PRs automatically generated by release workflows are tagged with the
Release
label, and also that any non-release PRs merged into the release branch (that is, after the feature freeze) are tagged asmetric: post feature freeze
.This will allow us to better monitor and quantify what gets merged after the feature freeze, whether it is a backport or a direct PR against the release branch.
Warning
metric: post feature freeze
must be created prior or after merging this PR.Closes #60180.
How to test the changes in this Pull Request:
Using the WooCommerce Testing Instructions Guide, include your detailed testing instructions:
release/10.1
branch.Release
andmetric: post feature freeze
.release/10.1
as release branch andstable
as bump type.Release
.10.1
as argument. Ensure that the generated PRs have labelRelease
.plugins/woocommerce/woocommerce.php
inside therelease/10.1
branch and open a PR with this change in your fork.metric: post feature freeze
.