-
Notifications
You must be signed in to change notification settings - Fork 10.8k
[Release] CI: change automation PRs author (batch 1) #60247
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
Conversation
Testing GuidelinesHi @prettyboymp @jorgeatorres @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:
|
📝 WalkthroughWalkthroughThe GitHub Actions workflows for cherry-picking pull requests were updated to change the Git committer/author identity from "WooCommerce Bot" to "woocommercebot" and use a GitHub noreply email. Steps using Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 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 (4)
🚧 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: 0
🧹 Nitpick comments (5)
.github/workflows/shared-cherry-pick.yml (2)
249-250
: Repeat-after-me token expression – extract once, reuse everywhere
The fallback expressiongithub-token: ${{ secrets.WC_BOT_PR_CREATE_TOKEN || secrets.GITHUB_TOKEN }}is repeated in several steps (here and below, and again in other workflows).
To DRY this up and avoid future copy-paste divergence, consider defining it once at workflow-level:env: GIT_COMMITTER_NAME: 'woocommercebot' GIT_COMMITTER_EMAIL: 'woocommercebot@users.noreply.github.com' GIT_AUTHOR_NAME: 'woocommercebot' GIT_AUTHOR_EMAIL: 'woocommercebot@users.noreply.github.com' + BOT_GITHUB_TOKEN: ${{ secrets.WC_BOT_PR_CREATE_TOKEN || secrets.GITHUB_TOKEN }}
…then reference it:
- github-token: ${{ secrets.WC_BOT_PR_CREATE_TOKEN || secrets.GITHUB_TOKEN }} + github-token: ${{ env.BOT_GITHUB_TOKEN }}Same tweak can be applied to every other workflow updated in this PR.
298-299
: Consistency nit – some earliergithub-script
steps still rely on the implicit token
Now that you’re passing an explicit token here, you may want to do the same for the earlier verification steps (Lines 60 / 105) for consistency and easier grepping in the future. Functionally it’s fine, just stylistic..github/workflows/cherry-pick-to-trunk.yml (1)
118-119
: Token repetition comment applies here too
Same duplication of the fallback expression. Consider theBOT_GITHUB_TOKEN
env trick mentioned in the shared workflow comment to keep things tidy..github/workflows/cherry-pick-to-frozen.yml (1)
129-130
: Token expression duplication
Same optional refactor as flagged earlier – factor the fallback token into an env var to cut repetition..github/workflows/cherry-pick-milestoned-prs.yml (1)
127-128
: DRY the token fallback
Same suggestion: pull theWC_BOT_PR_CREATE_TOKEN || GITHUB_TOKEN
expression into an env var and reference it, here and throughout the workflow.
📜 Review details
Configuration used: .coderabbit.yml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (4)
.github/workflows/cherry-pick-milestoned-prs.yml
(11 hunks).github/workflows/cherry-pick-to-frozen.yml
(6 hunks).github/workflows/cherry-pick-to-trunk.yml
(6 hunks).github/workflows/shared-cherry-pick.yml
(3 hunks)
🧰 Additional context used
🧠 Learnings (7)
📓 Common learnings
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: 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: 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.
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: jorgeatorres
PR: woocommerce/woocommerce#60250
File: .github/workflows/release-compile-changelog.yml:165-166
Timestamp: 2025-08-07T10:34:27.702Z
Learning: In WooCommerce release workflows, the VERSION variable used in changelog generation comes from the `validate-selected-branch-version` step, which extracts the version from `plugins/woocommerce/woocommerce.php` using `grep -oP '(?<=Version: )(.+)'` and validates it matches the input version. This ensures the version is always in the correct format by the time it reaches the changelog generation step, making additional error handling for version format validation unnecessary.
📚 Learning: in woocommerce release workflows, the version variable used in changelog generation comes from the `...
Learnt from: jorgeatorres
PR: woocommerce/woocommerce#60250
File: .github/workflows/release-compile-changelog.yml:165-166
Timestamp: 2025-08-07T10:34:27.702Z
Learning: In WooCommerce release workflows, the VERSION variable used in changelog generation comes from the `validate-selected-branch-version` step, which extracts the version from `plugins/woocommerce/woocommerce.php` using `grep -oP '(?<=Version: )(.+)'` and validates it matches the input version. This ensures the version is always in the correct format by the time it reaches the changelog generation step, making additional error handling for version format validation unnecessary.
Applied to files:
.github/workflows/cherry-pick-to-trunk.yml
.github/workflows/shared-cherry-pick.yml
.github/workflows/cherry-pick-to-frozen.yml
.github/workflows/cherry-pick-milestoned-prs.yml
📚 Learning: in woocommerce core repository, changelog entries for all prs live in `plugins/woocommerce/changelog...
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.
Applied to files:
.github/workflows/cherry-pick-to-trunk.yml
.github/workflows/shared-cherry-pick.yml
.github/workflows/cherry-pick-to-frozen.yml
.github/workflows/cherry-pick-milestoned-prs.yml
📚 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/cherry-pick-to-trunk.yml
.github/workflows/shared-cherry-pick.yml
.github/workflows/cherry-pick-to-frozen.yml
.github/workflows/cherry-pick-milestoned-prs.yml
📚 Learning: do not suggest using `cross-env` in the woocommerce repository as it's deprecated/archived and the t...
Learnt from: gigitux
PR: woocommerce/woocommerce#58785
File: plugins/woocommerce/client/blocks/package.json:0-0
Timestamp: 2025-06-17T10:25:36.686Z
Learning: Do not suggest using `cross-env` in the WooCommerce repository as it's deprecated/archived and the team is working to remove it from blocks commands to reduce the dependency tree. Instead, inline environment variables like `WP_EXPERIMENTAL_MODULES=true knip` should work fine in supported environments.
Applied to files:
.github/workflows/cherry-pick-to-trunk.yml
.github/workflows/shared-cherry-pick.yml
.github/workflows/cherry-pick-to-frozen.yml
.github/workflows/cherry-pick-milestoned-prs.yml
📚 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/cherry-pick-to-frozen.yml
📚 Learning: woocommerce trunk versions follow the pattern `x.y.0-dev` where the patch version is always `0`. thi...
Learnt from: jorgeatorres
PR: woocommerce/woocommerce#59946
File: .github/workflows/release-code-freeze.yml:108-124
Timestamp: 2025-07-23T19:42:10.564Z
Learning: WooCommerce trunk versions follow the pattern `X.Y.0-dev` where the patch version is always `0`. This means when calculating release branches, string operations like `slice(0, -2)` on the version after removing `-dev` will always work correctly since the input format is predictable (e.g., `10.2.0` → `10.2`).
Applied to files:
.github/workflows/cherry-pick-milestoned-prs.yml
🔇 Additional comments (7)
.github/workflows/shared-cherry-pick.yml (1)
39-44
: Identity switch looks correct and in-line with other workflows
Swapping the committer/author towoocommercebot
with the@users.noreply.github.com
e-mail is a ✅-move and keeps commits attributed to the bot account consistently across the repo..github/workflows/cherry-pick-to-trunk.yml (2)
9-14
: Identity switch acknowledged
woocommercebot
persona variables are updated as in the shared workflow – looks good.
41-42
: Secret inheritance is required – good catch
Explicitsecrets: inherit
ensures the reusable workflow can push the branch. Nice addition..github/workflows/cherry-pick-to-frozen.yml (2)
12-17
: Bot identity update
Change mirrors the other workflows – no issues spotted.
89-90
: Secret inheritance thumbs-up
Ensures the reusable cherry-pick job can authenticate when running frompull_request_target
..github/workflows/cherry-pick-milestoned-prs.yml (2)
11-16
: Bot persona switch approved
Consistent with the rest of the batch.
105-106
:secrets: inherit
OK
Allows pushes to release branches – required for milestoned picks.
….com:woocommerce/woocommerce into dev/WOOPLUG-5274-spike-automation-prs-author
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.
Reviewed and tested. No issues found.
IMPORTANT: Merging this PR to the appropriate branches is critical to the release process and ensures that the bug does not cause regressions in the future releases. Cherry picking was successful for |
Submission Review Guidelines:
Changes proposed in this Pull Request:
Related to: #60245, WOOPLUG-5274
To trigger CI for PRs created by our automation, we are switching the auth token starting with the cherry-picking automation.
Along the way, we fix resolving
woocommercebot
as a committer.The new token has a fallback to the GH actions token to simplify testing any future changes in the forks.
For the example PR note: GH action bot is not referenced, woocommercebot is correctly recognized as a committer.
How to test the changes in this Pull Request:
Follow test instructions from #59048, with additional setup steps: