Repository navigation
chore: pass slack bot token to slackapi - #4577
Conversation
Summary by CodeRabbit
WalkthroughThree GitHub Actions workflows now pass the Slack bot token via the Slack action’s Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant Runner as GitHub Actions Runner
participant SlackAction as slackapi/slack-github-action
participant Slack as Slack API
Note over Runner,SlackAction #F3F4F6: Old flow (env-based token)
Runner->>SlackAction: invoke step (env.SLACK_BOT_TOKEN present)
SlackAction->>Slack: POST message (Authorization: Bearer <env token>)
Slack-->>SlackAction: 2xx / error
SlackAction-->>Runner: step result
Note over Runner,SlackAction #EEF7EF: New flow (with.token input)
Runner->>SlackAction: invoke step (with.token: ${{ secrets.SLACK_BOT_TOKEN }})
SlackAction->>Slack: POST message (Authorization: Bearer <input token>)
Slack-->>SlackAction: 2xx / error
SlackAction-->>Runner: step result
Estimated code review effort🎯 2 (Simple) | ⏱️ ~5–15 minutes Possibly related PRs
Suggested reviewers
Suggestions
Tip 🔌 Remote MCP (Model Context Protocol) integration is now available!Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats. 📜 Recent review detailsConfiguration used: .coderabbit.yaml 💡 Knowledge Base configuration:
You can enable these sources in your CodeRabbit configuration. 📥 CommitsReviewing files that changed from the base of the PR and between c05847f5ac351fac65b9e60575a97bc061db3da7 and 6b27013. 📒 Files selected for processing (3)
🚧 Files skipped from review as they are similar to previous changes (3)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (9)
✨ 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/Issue comments)Type Other keywords and placeholders
Status, Documentation and Community
|
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (3)
.github/workflows/publish-new-release.yml (3)
167-201: Optional: Decide if Slack should notify even when earlier steps fail.Right now, the Slack step will be skipped if a prior step fails;
continue-on-error: trueonly prevents this step from failing the job. If you want notifications regardless of previous step outcomes, gate the step withalways(), and optionally tailor the payload for success vs failure.Example (minimal change to always run the step):
- name: Notify Slack Channel id: slack uses: slackapi/slack-github-action@91efab103c0de0a537f72a35f6b8cda0ee76bf0a # v2.1.1 - continue-on-error: true + if: ${{ always() }} + continue-on-error: trueIf you want different messages, add two steps with
if: ${{ success() }}andif: ${{ failure() }}respectively.
178-200: Optional: Reduce duplicated message text in payload.You repeat the same content in both
textand a block section. Keepingtextconcise (for notifications/fallback) and using blocks for the full message reduces duplication and maintenance cost.Example payload tweak:
- "text": "*<${{env.RELEASES_URL}}v${{ steps.extract-version.outputs.release_version }}|v${{ steps.extract-version.outputs.release_version }}>*\nCC: <!subteam^S02AEQL26CT> <!subteam^S03SEKBFX0D> <@U021E50QAGY>", + "text": "New release published: v${{ steps.extract-version.outputs.release_version }}", "blocks": [ { "type": "header", "text": { "type": "plain_text", "text": ":tada: ${{ env.PROJECT_NAME }} - New GitHub Release :tada:" } }, { "type": "divider" }, { "type": "section", "text": { "type": "mrkdwn", - "text": "*<${{env.RELEASES_URL}}v${{ steps.extract-version.outputs.release_version }}|v${{ steps.extract-version.outputs.release_version }}>*\nCC: <!subteam^S02AEQL26CT> <!subteam^S03SEKBFX0D> <@U021E50QAGY>" + "text": "*<${{env.RELEASES_URL}}v${{ steps.extract-version.outputs.release_version }}|v${{ steps.extract-version.outputs.release_version }}>*\nCC: <!subteam^S02AEQL26CT> <!subteam^S03SEKBFX0D> <@U021E50QAGY>" } } ]
169-170: No newer stable slack-github-action release
The latest stable v2.x remains v2.1.1—your pinned SHA corresponds to that tag. There is a v2.0.0-rc.1 pre-release, but no newer stable release is available.Optional improvement:
- To automatically pick up future v2 patch releases (while avoiding major bumps), consider pinning to
•slackapi/slack-github-action@v2
• or@v2.1.1
instead of a raw commit SHA.
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📥 Commits
Reviewing files that changed from the base of the PR and between bfa80ef and 86a7564e4b918fc31da01ce56f1aaa867ce491a5.
📒 Files selected for processing (1)
.github/workflows/publish-new-release.yml(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (9)
- GitHub Check: Build Transformer Docker Image - PR / Build Transformer Docker Image AMD64
- GitHub Check: Build Transformer Docker Image - PR / Build Transformer Docker Image ARM64
- GitHub Check: Build User Transformer Docker Image - PR / Build Transformer Docker Image ARM64
- GitHub Check: Build User Transformer Docker Image - PR / Build Transformer Docker Image AMD64
- GitHub Check: Code Coverage
- GitHub Check: UT Tests
- GitHub Check: test_and_publish
- GitHub Check: Analyze (go)
- GitHub Check: Analyze (javascript-typescript)
🔇 Additional comments (1)
.github/workflows/publish-new-release.yml (1)
176-176: Token passed viawith.tokenis correct for slackapi/slack-github-action v2.This aligns with the action’s recommended usage and avoids relying on env for auth. Nice cleanup.
|
Allure Test reports for this run are available at:
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #4577 +/- ##
========================================
Coverage 91.81% 91.81%
========================================
Files 642 642
Lines 33930 33930
Branches 8041 8042 +1
========================================
Hits 31152 31152
- Misses 2526 2548 +22
+ Partials 252 230 -22 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Allure Test reports for this run are available at:
|
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (1)
.github/workflows/prepare-for-prod-ut-deploy.yml (1)
196-203: Same token-handling concern here; verifywith.tokensupport, or keepenv: SLACK_BOT_TOKENas a temporary safety netThe change is consistent with the other workflow. If
with.tokenis not a supported input on v2.1.1, this step will fail to authenticate and silently continue due tocontinue-on-error: true, resulting in missing Slack notifications.Action items:
- Verify that
with.tokenis supported in v2.1.1.- Optionally keep
env: SLACK_BOT_TOKENuntil validation is complete.Use the same verification steps as noted in the other file. Suggested safe fallback:
- name: Notify Control Plane Team uses: slackapi/slack-github-action@91efab103c0de0a537f72a35f6b8cda0ee76bf0a # v2.1.1 continue-on-error: true with: method: chat.postMessage token: ${{ secrets.SLACK_BOT_TOKEN }} payload: | { "channel": "${{ secrets.SLACK_CONTROL_PLANE_CHANNEL_ID }}", "text": "*UT Deployment PRs Created*\nCC: @control-plane-on-call", ... } + env: + SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📥 Commits
Reviewing files that changed from the base of the PR and between 86a7564e4b918fc31da01ce56f1aaa867ce491a5 and c05847f5ac351fac65b9e60575a97bc061db3da7.
📒 Files selected for processing (2)
.github/workflows/prepare-for-prod-ut-deploy.yml(1 hunks).github/workflows/slack-notify.yml(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (9)
- GitHub Check: Build User Transformer Docker Image - PR / Build Transformer Docker Image AMD64
- GitHub Check: Build User Transformer Docker Image - PR / Build Transformer Docker Image ARM64
- GitHub Check: Build Transformer Docker Image - PR / Build Transformer Docker Image AMD64
- GitHub Check: Build Transformer Docker Image - PR / Build Transformer Docker Image ARM64
- GitHub Check: Code Coverage
- GitHub Check: UT Tests
- GitHub Check: test_and_publish
- GitHub Check: Analyze (go)
- GitHub Check: Analyze (javascript-typescript)
🔇 Additional comments (1)
.github/workflows/slack-notify.yml (1)
24-33: Slack action supportswith.tokenin v2.1.1; no fallback neededThe pinned SHA (
slackapi/slack-github-action@91efab103c0de0a537f72a35f6b8cda0ee76bf0a, v2.1.1) officially accepts atokeninput, so your step will authenticate correctly with:- name: notify uses: slackapi/slack-github-action@91efab103c0de0a537f72a35f6b8cda0ee76bf0a continue-on-error: true with: method: chat.postMessage token: ${{ secrets.SLACK_BOT_TOKEN }} payload: | { "channel": "${{ secrets.SLACK_INTEGRATION_DEV_CHANNEL_ID }}", "text": "*<prod release tests failed>*\nCC: <!subteam^S02AEQL26CT>", … } env: PROJECT_NAME: 'Rudder Transformer'No additional
env: SLACK_BOT_TOKENfallback is required.
c05847f to
6b27013
Compare
|
Allure Test reports for this run are available at:
|
|



What are the changes introduced in this PR?
Correct way to pass the Slack bot token under the with field:
https://docs.slack.dev/tools/slack-github-action/sending-techniques/sending-data-slack-api-method/?utm_source=chatgpt.com
What is the related Linear task?
Resolves INT-4049
Please explain the objectives of your changes below
Put down any required details on the broader aspect of your changes. If there are any dependent changes, mandatorily mention them here
Any changes to existing capabilities/behaviour, mention the reason & what are the changes ?
N/A
Any new dependencies introduced with this change?
N/A
Any new generic utility introduced or modified. Please explain the changes.
N/A
Any technical or performance related pointers to consider with the change?
N/A
@coderabbitai review
Developer checklist
My code follows the style guidelines of this project
No breaking changes are being introduced.
All related docs linked with the PR?
All changes manually tested?
Any documentation changes needed with this change?
Is the PR limited to 10 file changes?
Is the PR limited to one linear task?
Are relevant unit and component test-cases added in new readability format?
Reviewer checklist
Is the type of change in the PR title appropriate as per the changes?
Verified that there are no credentials or confidential data exposed with the changes.