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:
parent
6a1c166b9f
commit
397b7e2038
1 changed files with 4 additions and 0 deletions
|
@ -66,6 +66,10 @@ func (s *client) newPayload(result v1alpha2.PolicyReportResult) payload {
|
||||||
Attachments: make([]attachment, 0, 1),
|
Attachments: make([]attachment, 0, 1),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if s.channel != "" {
|
||||||
|
p.Channel = s.channel
|
||||||
|
}
|
||||||
|
|
||||||
att := attachment{
|
att := attachment{
|
||||||
Color: colors[result.Priority],
|
Color: colors[result.Priority],
|
||||||
Blocks: make([]block, 0),
|
Blocks: make([]block, 0),
|
||||||
|
|
Loading…
Reference in a new issue