Skip to content

ci: use SLACK_CHANNEL env var for activity notifications#16323

Merged
denolfe merged 1 commit intomainfrom
ci/activity-notifications-channel
Apr 20, 2026
Merged

ci: use SLACK_CHANNEL env var for activity notifications#16323
denolfe merged 1 commit intomainfrom
ci/activity-notifications-channel

Conversation

@denolfe
Copy link
Copy Markdown
Member

@denolfe denolfe commented Apr 20, 2026

Overview

Updates the activity notifications workflow and action scripts to read the Slack channel from a SLACK_CHANNEL secret rather than hardcoded constants. Also fixes a bug where step failures were silently swallowed.

Key Changes

  • Remove CHANNELS constants

    • Deleted src/constants.ts and its imports from both action modules. The channel is now read from process.env.SLACK_CHANNEL, validated at startup with a TypeError if unset.
  • Add SLACK_CHANNEL to workflow env

    • activity-notifications.yml now passes SLACK_CHANNEL: ${{ secrets.SLACK_CHANNEL }}. This makes the target channel configurable without code changes.
  • Remove continue-on-error: true from both steps

    • Both steps had continue-on-error: true, which caused script failures to be reported as passed at the job level. Removing it surfaces failures correctly.

Design Decisions

SLACK_CHANNEL accepts either a channel name (e.g. #payload-dev) or a channel ID (e.g. C1234567890). Channel ID is recommended since it stays stable if the channel is renamed.

The DEBUG routing logic (which previously switched between CHANNELS.DEV and CHANNELS.DEBUG) has been removed along with the constants. The channel is now set directly via the secret.

@denolfe denolfe marked this pull request as ready for review April 20, 2026 14:35
@denolfe denolfe requested a review from paulpopus April 20, 2026 14:35
@denolfe denolfe merged commit a7cc58b into main Apr 20, 2026
20 checks passed
@denolfe denolfe deleted the ci/activity-notifications-channel branch April 20, 2026 15:04
@github-actions
Copy link
Copy Markdown
Contributor

🚀 This is included in version v3.84.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants