Skip to content

Commit

Permalink
Merge pull request #8 from gianlucam76/fix
Browse files Browse the repository at this point in the history
Fix slack message
  • Loading branch information
gianlucam76 authored Jan 17, 2023
2 parents 38aa660 + adaa2bb commit 1fd21c0
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion process_result/register.go
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ func Register(ctx context.Context, setters ...Option) error {

if c.SlackInfo != nil {
utils.Byf(fmt.Sprintf("Send failed tests notification to slack channel %s", c.SlackInfo.Channel))
sendWebexNotification(&report, c, msg)
sendSlackNotification(&report, c, msg)
}
}

Expand All @@ -174,6 +174,13 @@ func sendWebexNotification(report *ginkgoTypes.Report, c *Options, msg string) {
webex_helper.SendWebexMessage(c.getWebexInfo(), msg)
}

// sendSlackNotification send a message for each failed test.
func sendSlackNotification(report *ginkgoTypes.Report, c *Options, msg string) {
utils.Byf("Eventually sending Slack notifications")

slack_helper.SendSlackMessage(c.getSlackInfo(), msg)
}

func prepareMessage(report *ginkgoTypes.Report, c *Options, openIssues []jira.Issue) string {
msg := ""
for i := range report.SpecReports {
Expand Down

0 comments on commit 1fd21c0

Please sign in to comment.