Commit 7347b67
authored
ci: missing Slack webhook failure handling + fix notification format (#131)
* ci: make a missing Slack webhook a clear failure, not a cryptic one
The weekly release failed on Aug 28 and the alert never reached Slack. The
notify job failed with:
Missing input! Either a method or webhook is required to take action.
COSY_WEBHOOK_URL resolves to an empty string, so GitHub omits the `webhook`
input entirely and the action rejects the call. The secret exists but was
created 2026-08-12 and never updated -- one day before the weekly release
workflow landed in #108 -- and the notify path was not exercised until the
Aug 28 failure, so this alert has never worked.
Check the webhook in a preflight step that names the missing secret, and set
errors: true so Slack-side delivery failures fail the step instead of
reporting green.
Neither change can populate the secret; that still needs setting in repo
settings. They make the next failure say so in one line.
* ci: send the Slack payload as JSON with a literal-newline message
slack-github-action v4 ships js-yaml v5, which enforces stricter multiline
indentation. MESSAGE was a double-quoted YAML scalar, so its \n\n became real
newlines that were interpolated into the YAML payload at column 0 and broke
the document:
Invalid input! Failed to parse contents of the provided payload
SyntaxError: Expected property name or '}' in JSON at position 1
Single-quote MESSAGE so \n stays a two-character escape, and send the payload
as JSON, where an interpolated message cannot break the structure and \n is
exactly the newline Slack mrkdwn renders.
Verified end to end on a throwaway branch: the notify job was forced to run
under dryRun and delivered to Slack with errors: true, so a rejected delivery
would have failed the step.
* ci: drop explanatory comments from the notify job1 parent 4b2f682 commit 7347b67
1 file changed
Lines changed: 20 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
85 | 95 | | |
86 | 96 | | |
87 | 97 | | |
88 | | - | |
| 98 | + | |
89 | 99 | | |
90 | 100 | | |
91 | 101 | | |
| 102 | + | |
92 | 103 | | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
0 commit comments