Skip to content

Commit

Permalink
sink/slack: Use GetString for color (#112)
Browse files Browse the repository at this point in the history
Signed-off-by: Kazuki Suda <kazuki.suda@gmail.com>
  • Loading branch information
superbrothers committed Jul 23, 2023
1 parent 166ee6e commit 8b324e8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pkg/sinks/slack.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,10 @@ func (s *SlackSink) Send(ctx context.Context, ev *kube.EnhancedEvent) error {
}
}
if s.cfg.Color != "" {
slackAttachment.Color = s.cfg.Color
slackAttachment.Color, err = GetString(ev, s.cfg.Color)
if err != nil {
return err
}
}
if s.cfg.Title != "" {
slackAttachment.Title, err = GetString(ev, s.cfg.Title)
Expand Down

0 comments on commit 8b324e8

Please sign in to comment.