feat: add support for nested messages #142
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR includes some more logic in the creation of the attachments in the
default_notifications
method.Motivation and Context
The
value
attribute of the attachments only accept strings, so when not sent as such Slack is ignoring them. This makes some important information to be missing in the Slack message.Breaking Changes
This change doesn't break backwards compatibility.
How Has This Been Tested?
examples/*
projectsI tested the change with Pytest and added a new case in which the new behavior can be seen.
I also created the resources in AWS with a
aws_cloudwatch_event_rule
to send the events to the SNS topic.Both tests worked as expected.
Result
Before this PR:
![Screen Shot 2021-06-18 at 15 55 43](https://user-images.githubusercontent.com/2416962/122574531-04b71300-d050-11eb-9ccd-e1c800204bd2.png)
After this PR:
![Screen Shot 2021-06-18 at 15 56 40](https://user-images.githubusercontent.com/2416962/122574555-0a145d80-d050-11eb-88f2-ac6f62749644.png)