-
Notifications
You must be signed in to change notification settings - Fork 10.8k
Move the woo-announcement
notification to after stable tags are updated
#59064
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
📝 WalkthroughWalkthroughThe changes update GitHub Actions workflows for release notifications. A Slack notification step for the announcements channel was removed from the Changes
Possibly related PRs
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. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
Testing GuidelinesHi @prettyboymp @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:
|
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.
Changes look good. Just one change request.
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: 1
📜 Review details
Configuration used: .coderabbit.yml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
.github/workflows/release-new-release-published.yml
(0 hunks).github/workflows/release-update-stable-tag.yml
(1 hunks)
💤 Files with no reviewable changes (1)
- .github/workflows/release-new-release-published.yml
🧰 Additional context used
🧠 Learnings (1)
📓 Common learnings
Learnt from: CR
PR: woocommerce/woocommerce#0
File: .cursor/rules/generate-pr-description.mdc:0-0
Timestamp: 2025-06-23T12:25:21.208Z
Learning: When generating a pull request (PR) description for this repository, always preserve the markdown structure of the PR template, especially sections required by automation such as the changelog entry details and comments. The changelog section must retain its exact markdown structure, 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-06-23T12:25:21.208Z
Learning: When generating a PR description, summarize the changes, testing steps, and rationale in a concise and clear manner to facilitate reviewer understanding. Provide clear, step-by-step instructions for how to test the changes.
🔇 Additional comments (1)
.github/workflows/release-update-stable-tag.yml (1)
241-241
: Nice: action is pinned to a specific commit SHAUsing
archive/github-actions-slack@a62d71…
instead of a mutable tag mitigates supply-chain risks.
- name: 'Notify to announcements channel' | ||
uses: archive/github-actions-slack@a62d71a4ea93e68cbdc37581166b0298bea512e9 # v 2.10.0 | ||
with: | ||
slack-bot-user-oauth-access-token: ${{ secrets.CODE_FREEZE_BOT_TOKEN }} | ||
slack-channel: ${{ secrets.WOO_ANNOUNCEMENTS_SLACK_CHANNEL }} | ||
slack-optional-unfurl_links: false | ||
slack-text: | | ||
:woo-bounce: *<${{ github.event.release.html_url }}|WooCommerce ${{ github.event.release.name }}>* has been released! :rocket: |
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.
github.event.release.*
is undefined in workflow_dispatch
— Slack message will break
This workflow is triggered via workflow_dispatch
, which means the github.event
payload contains only the inputs
object and a few top-level fields. It does not include a release
key.
Consequently ${{ github.event.release.html_url }}
and ${{ github.event.release.name }}
will resolve to empty strings, producing either an empty message or a runtime failure in the Slack step.
- :woo-bounce: *<${{ github.event.release.html_url }}|WooCommerce ${{ github.event.release.name }}>* has been released! :rocket:
+ :woo-bounce: *<https://github.com/${{ github.repository }}/releases/tag/v${{ needs.validate-release.outputs.version }}|WooCommerce v${{ needs.validate-release.outputs.version }}>* has been released! :rocket:
If you still need the official release object, add a preceding step that calls the GitHub API (e.g., with actions/github-script
) to fetch the release by tag and save the URL/name to outputs, then reference those outputs here.
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
- name: 'Notify to announcements channel' | |
uses: archive/github-actions-slack@a62d71a4ea93e68cbdc37581166b0298bea512e9 # v 2.10.0 | |
with: | |
slack-bot-user-oauth-access-token: ${{ secrets.CODE_FREEZE_BOT_TOKEN }} | |
slack-channel: ${{ secrets.WOO_ANNOUNCEMENTS_SLACK_CHANNEL }} | |
slack-optional-unfurl_links: false | |
slack-text: | | |
:woo-bounce: *<${{ github.event.release.html_url }}|WooCommerce ${{ github.event.release.name }}>* has been released! :rocket: | |
- name: 'Notify to announcements channel' | |
uses: archive/github-actions-slack@a62d71a4ea93e68cbdc37581166b0298bea512e9 # v 2.10.0 | |
with: | |
slack-bot-user-oauth-access-token: ${{ secrets.CODE_FREEZE_BOT_TOKEN }} | |
slack-channel: ${{ secrets.WOO_ANNOUNCEMENTS_SLACK_CHANNEL }} | |
slack-optional-unfurl_links: false | |
slack-text: | | |
- :woo-bounce: *<${{ github.event.release.html_url }}|WooCommerce ${{ github.event.release.name }}>* has been released! :rocket: | |
+ :woo-bounce: *<https://github.com/${{ github.repository }}/releases/tag/v${{ needs.validate-release.outputs.version }}|WooCommerce v${{ needs.validate-release.outputs.version }}>* has been released! :rocket: |
🤖 Prompt for AI Agents
In .github/workflows/release-update-stable-tag.yml around lines 240 to 247, the
Slack notification step uses github.event.release.html_url and
github.event.release.name, which are undefined when the workflow is triggered by
workflow_dispatch. To fix this, add a prior step that uses the GitHub API (for
example, with actions/github-script) to fetch the release details by tag, then
save the release URL and name as outputs. Update the Slack notification step to
reference these outputs instead of github.event.release properties.
…ated (#59064) * Add `Release: Update stable tag` workflow * Change version formats * Create also a PR for the release branch * Update svn secrets * Remove the dry-run and add confirm-update * Remove unnecessary apt-get update * Use proper errors * Use diff --quiet conditions * Require the full version * Checkout trunk only * Merge validation steps into single job * Verify current stable tag is diff from the target version * Allow reverting with checkbox * Remove compare version dep * Move the woo-announcement notification to after stable tags are updated * Notify only when it's not a revert * Add link * Pin to specific commit sha * Fix mistake from resolving conflicts
Submission Review Guidelines:
Changes proposed in this Pull Request:
This PR moves the release Slack announcement notification to trigger after stable tag updates are completed, rather than when the release is initially published.
Closes #59057
How to test the changes in this Pull Request:
Using the WooCommerce Testing Instructions Guide, include your detailed testing instructions:
woocommerce/woocommerce
repo with all branches into your GH account.Settings > Secrets and variables > Actions
and create new repository secrets:SVN_REPO_URL
,SVN_USERNAME
, andSVN_PASSWORD
(you can get them from the secret store, search forFlux SVN test repo
).CODE_FREEZE_BOT_TOKEN
: get the token value from the Test Assistant bot from the secret store.WOO_ANNOUNCEMENTS_SLACK_CHANNEL
: you can use the test channeltest-woo-core-release-notifications
.59057/announcement-notification
and merge it (to get this new workflow intotrunk
).readme.txt
.Actions
, click on theRelease: Update stable tag
, and run the flow with a version lower than the current trunk one from the previous step (for example, if current is9.8.5
, you can input9.8.3
or9.8.4
). CheckI confirm...
andAllow revert
checkboxes.Release: Update stable tag
again with a higher version than current (for example, go back to9.8.5
).Testing that has already taken place:
Changelog entry
Changelog Entry Details
Significance
Type
Message
Changelog Entry Comment
Comment