Skip to content

Commit

Permalink
FIX: Propagate Slack channel Override (#459)
Browse files Browse the repository at this point in the history
This PR fixes a bug that prevents routing slack messages
to the configured target channels.

Related to: #458

Signed-off-by: Jesus Carrillo <jesuscarrillo8@gmail.com>
  • Loading branch information
jescarri committed Jul 10, 2024
1 parent 6a1c166 commit 397b7e2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/target/slack/slack.go
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down

0 comments on commit 397b7e2

Please sign in to comment.