diff --git a/services/tasks/alert.go b/services/tasks/alert.go index 9b8724f1..b9872050 100644 --- a/services/tasks/alert.go +++ b/services/tasks/alert.go @@ -382,7 +382,7 @@ func (t *TaskRunner) alertInfos() (string, string) { author = user.Name } - return version, author + return author, version } func (t *TaskRunner) alertColor(kind string) string { diff --git a/services/tasks/templates/slack.tmpl b/services/tasks/templates/slack.tmpl index 18afc956..ca93d818 100644 --- a/services/tasks/templates/slack.tmpl +++ b/services/tasks/templates/slack.tmpl @@ -13,6 +13,13 @@ "title": "Author", "value": "{{ .Author }}", "short": true + {{ if .Task.Version }} + }, + { + "title": "Version", + "value": "{{ .Task.Version }}", + "short": true + {{ end }} } ] }