diff --git a/server/issue_parser.go b/server/issue_parser.go index 779c8d975..c09114a2f 100644 --- a/server/issue_parser.go +++ b/server/issue_parser.go @@ -16,12 +16,14 @@ import ( var jiraLinkWithTextRegex = regexp.MustCompile(`\[([^\[]+)\|([^\]]+)\]`) +const maxIssueSummaryLength = 80 + func parseJiraLinksToMarkdown(text string) string { return jiraLinkWithTextRegex.ReplaceAllString(text, "[${1}](${2})") } func mdKeySummaryLink(issue *jira.Issue, instance Instance) string { - return fmt.Sprintf("[%s: %s (%s)](%s%s)", issue.Key, issue.Fields.Summary, issue.Fields.Status.Name, instance.GetJiraBaseURL(), "/browse/"+issue.Key) + return fmt.Sprintf("[%s: %s (%s)](%s%s)", issue.Key, truncate(issue.Fields.Summary, maxIssueSummaryLength), issue.Fields.Status.Name, instance.GetJiraBaseURL(), "/browse/"+issue.Key) } func reporterSummary(reporter *jira.User) string {