Skip to content

Commit

Permalink
fix summary
Browse files Browse the repository at this point in the history
  • Loading branch information
jkroepke committed Oct 22, 2024
1 parent 7614a76 commit 7723c4b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion pkg/notify/notify.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,13 @@ func (r *Receiver) Notify(data *alertmanager.Data, hashJiraLabel bool, updateSum
return false, errors.Wrap(err, "render issue description")
}

if len(issueSummary) > 255 {
level.Info(r.logger).Log("msg", "truncating summary", "original", len(issueSummary), "limit", 255)
issueSummary = issueDesc[:255]
}

if len(issueDesc) > maxDescriptionLength {
level.Warn(r.logger).Log("msg", "truncating description", "original", len(issueDesc), "limit", maxDescriptionLength)
level.Info(r.logger).Log("msg", "truncating description", "original", len(issueDesc), "limit", maxDescriptionLength)
issueDesc = issueDesc[:maxDescriptionLength]
}

Expand Down

0 comments on commit 7723c4b

Please sign in to comment.