Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .changeset/bump-js-yaml-5x.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
"@slack/slack-github-action": major
---

build: parse yaml with more strict multiline indentation rules

Internal dependencies of [`js-yaml@v5`](https://github.com/nodeca/js-yaml/blob/master/CHANGELOG.md#500---2026-06-20) make YAML parsing more strict and compliant with the YAML specification. Indentation is now required for values that span multiple lines against the base value.

See the YAML [line prefixes](https://yaml.org/spec/1.2.2/#63-line-prefixes) spec for the expected indentation rule:

```diff
channel: "C0123"
text: "first line

- second line"
+ second line"
```
2 changes: 1 addition & 1 deletion .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ jobs:
channel: ${{ secrets.SLACK_CHANNEL_ID }}
text: ":checkered_flag: A multiline message wraps across lines
with a blank line before <https://github.com/${{ github.repository }}|a link>"
with a blank line before <https://github.com/${{ github.repository }}|a link>"
- name: "test(api): confirm the multiline message was posted"
run: test -n "$MULTILINE_OUTPUT_TS"
Expand Down
33 changes: 28 additions & 5 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
"@slack/web-api": "^8.0.0",
"@slack/webhook": "^8.0.0",
"flat": "^6.0.1",
"js-yaml": "^4.2.0",
"js-yaml": "^5.2.1",
"markup-js": "^1.5.21",
"undici": "^8.7.0"
},
Expand Down
2 changes: 1 addition & 1 deletion test/content.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ describe("content", () => {
it("parses multiline YAML from the input payload", async () => {
mocks.core.getInput
.withArgs("payload")
.returns('channel: C0123456789\ntext: "first line\n\nsecond line"');
.returns('channel: C0123456789\ntext: "first line\n\n second line"');
const config = new Config(mocks.core);
const expected = {
channel: "C0123456789",
Expand Down
Loading