1
0
Fork 0
mirror of https://github.com/kyverno/policy-reporter.git synced 2024-12-14 11:57:32 +00:00

FIX: Propagate Slack channel Override (#459)

This PR fixes a bug that prevents routing slack messages
to the configured target channels.

Related to: https://github.com/kyverno/policy-reporter/issues/458

Signed-off-by: Jesus Carrillo <jesuscarrillo8@gmail.com>
This commit is contained in:
Jesus Carrillo 2024-07-10 01:00:28 -07:00 committed by GitHub
parent 6a1c166b9f
commit 397b7e2038
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -66,6 +66,10 @@ func (s *client) newPayload(result v1alpha2.PolicyReportResult) payload {
Attachments: make([]attachment, 0, 1),
}
if s.channel != "" {
p.Channel = s.channel
}
att := attachment{
Color: colors[result.Priority],
Blocks: make([]block, 0),