Commit 92eadcf
committed
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.1 parent 87bc8a8 commit 92eadcf
1 file changed
Lines changed: 14 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
99 | 99 | | |
100 | 100 | | |
101 | 101 | | |
102 | | - | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
103 | 106 | | |
104 | 107 | | |
105 | 108 | | |
106 | 109 | | |
107 | 110 | | |
108 | 111 | | |
109 | 112 | | |
| 113 | + | |
| 114 | + | |
110 | 115 | | |
111 | | - | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
0 commit comments