Commit a7cc58b
authored
ci: use SLACK_CHANNEL env var for activity notifications (#16323)
# 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.1 parent 6731036 commit a7cc58b
6 files changed
Lines changed: 15 additions & 16 deletions
File tree
- .github
- actions/activity
- dist
- new-issues
- popular-issues
- src
- workflows
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | 5 | | |
7 | 6 | | |
8 | 7 | | |
| |||
42 | 41 | | |
43 | 42 | | |
44 | 43 | | |
| 44 | + | |
45 | 45 | | |
46 | | - | |
47 | | - | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
48 | 50 | | |
49 | 51 | | |
50 | 52 | | |
| |||
70 | 72 | | |
71 | 73 | | |
72 | 74 | | |
73 | | - | |
| 75 | + | |
74 | 76 | | |
75 | 77 | | |
76 | 78 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | 5 | | |
7 | 6 | | |
8 | 7 | | |
| |||
51 | 50 | | |
52 | 51 | | |
53 | 52 | | |
| 53 | + | |
54 | 54 | | |
55 | | - | |
56 | | - | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
57 | 59 | | |
58 | 60 | | |
59 | 61 | | |
| |||
79 | 81 | | |
80 | 82 | | |
81 | 83 | | |
82 | | - | |
| 84 | + | |
83 | 85 | | |
84 | 86 | | |
85 | 87 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
25 | 24 | | |
26 | 25 | | |
27 | | - | |
28 | 26 | | |
29 | 27 | | |
30 | 28 | | |
| 29 | + | |
31 | 30 | | |
0 commit comments