Skip to content

Commit 285990b

Browse files
ci: forward CUOPT_SLACK_MENTION_ID secret to nightly-summary (#1182)
## Summary - Declare `CUOPT_SLACK_MENTION_ID` as an optional `workflow_call` secret on the reusable `nightly-summary` workflow and forward it to the run-step env. - Pass it from `test.yaml` to the `nightly-summary` job alongside the other Slack secrets. ## Why `ci/nightly_summary.sh` already forwards `CUOPT_SLACK_MENTION_ID` to `ci/utils/generate_slack_payloads.py`, which uses it to prefix `<@id>` mentions on **new failures** and **new flaky tests**. Until now the env var was never populated in CI, so the mention was always empty. With this change, setting the `CUOPT_SLACK_MENTION_ID` repo secret (Slack user ID like `U01ABCDEF` or group handle like `S01ABCDEF`) will ping the configured handle. Leaving it unset preserves the no-mention default. ## Test plan - [ ] Add `CUOPT_SLACK_MENTION_ID` repo secret. - [ ] Trigger a nightly run (or `workflow_dispatch` on `nightly-summary`) and confirm the Slack message includes the `<@id>` mention on new failures. - [ ] Verify behavior is unchanged when the secret is unset (no mention).
1 parent 733a459 commit 285990b

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

.github/workflows/nightly-summary.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ on:
4949
required: false
5050
CUOPT_SLACK_CHANNEL_ID:
5151
required: false
52+
CUOPT_SLACK_MENTION_ID:
53+
required: false
5254

5355
jobs:
5456
nightly-summary:
@@ -70,6 +72,7 @@ jobs:
7072
CUOPT_S3_URI: ${{ secrets.CUOPT_S3_URI }}
7173
CUOPT_SLACK_BOT_TOKEN: ${{ secrets.CUOPT_SLACK_BOT_TOKEN }}
7274
CUOPT_SLACK_CHANNEL_ID: ${{ secrets.CUOPT_SLACK_CHANNEL_ID }}
75+
CUOPT_SLACK_MENTION_ID: ${{ secrets.CUOPT_SLACK_MENTION_ID }}
7376
GITHUB_REPOSITORY: ${{ github.repository }}
7477
GITHUB_RUN_ID: ${{ github.run_id }}
7578
GITHUB_SERVER_URL: ${{ github.server_url }}

.github/workflows/test.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,3 +123,4 @@ jobs:
123123
CUOPT_S3_URI: ${{ secrets.CUOPT_S3_URI }}
124124
CUOPT_SLACK_BOT_TOKEN: ${{ secrets.CUOPT_SLACK_BOT_TOKEN }}
125125
CUOPT_SLACK_CHANNEL_ID: ${{ secrets.CUOPT_SLACK_CHANNEL_ID }}
126+
CUOPT_SLACK_MENTION_ID: ${{ secrets.CUOPT_SLACK_MENTION_ID }}

0 commit comments

Comments
 (0)