diff options
-rw-r--r-- | app/plugin/jira/webhook.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/plugin/jira/webhook.go b/app/plugin/jira/webhook.go index c09e46703..fee33767b 100644 --- a/app/plugin/jira/webhook.go +++ b/app/plugin/jira/webhook.go @@ -92,7 +92,11 @@ func (w *Webhook) SlackAttachment() (*model.SlackAttachment, error) { text, err := w.renderText("" + "[{{.Issue.Fields.Summary}}]({{.JIRAURL}}/browse/{{.Issue.Key}})" + "{{if eq .WebhookEvent \"jira:issue_created\"}}{{if ne .Issue.Fields.Description \"\"}}" + + "{{if len .Issue.Fields.Description | lt 3000}}" + + "\n\n{{printf \"%.3000s\" .Issue.Fields.Description}}..." + + "{{else}}" + "\n\n{{.Issue.Fields.Description}}" + + "{{end}}" + "{{end}}{{end}}" + "") if err != nil { |