Skip to content

Fix JSON escaping in Slack notifications#2203

Open
gcasilva wants to merge 1 commit into
aws:mainfrom
gcasilva:fix-2147-slack-notification-json
Open

Fix JSON escaping in Slack notifications#2203
gcasilva wants to merge 1 commit into
aws:mainfrom
gcasilva:fix-2147-slack-notification-json

Conversation

@gcasilva

Copy link
Copy Markdown

Description of the issue

Slack notification payloads interpolate issue and pull request metadata directly inside JSON string literals. Titles containing double quotes, backslashes, or newlines can therefore produce invalid JSON and cause the notification action to fail.

Fixes #2147.

Description of changes

Use GitHub Actions' toJSON function for every dynamic payload string in both the issue and pull request notifications. The expression engine now emits correctly escaped JSON values before the Slack action parses the payload.

License

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Tests

Requirements

No Go or shell source files are changed; workflow-specific validation is listed above.


Integration Tests

To run integration tests against this PR, add the ready for testing label.

@gcasilva
gcasilva requested a review from a team as a code owner July 15, 2026 01:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Quotation marks in issue titles cause automation failures

2 participants