fix: use pipeline link in default template

This commit is contained in:
Robert Kaussow 2023-08-16 00:30:39 +02:00
parent 0e78a450f3
commit 6cf8fcea27
Signed by: xoxys
GPG Key ID: 4E692A2EAECC03C0
3 changed files with 4 additions and 3 deletions

View File

@ -1,3 +1,4 @@
userid
url
roomid
wp-matrix

View File

@ -37,7 +37,7 @@ properties:
is exposed to the template and all fields can be referenced. To extend the functionality, [sprig functions](https://masterminds.github.io/sprig/) can also be used.
defaultValue: |
Status: **{{ .Pipeline.Status }}**<br/>
Build: [{{ .Repository.Owner }}/{{ .Repository.Name }}]({{ .Repository.Link }}){{ if .Repository.Branch }} ({{ .Repository.Branch }}){{ end }} by {{ .Commit.Author }}<br/>
Message: {{ .Commit.Message }}
Build: [{{ .Repository.Owner }}/{{ .Repository.Name }}]({{ .Pipeline.Link }}){{ if .Curr.TargetBranch }} ({{ .Curr.TargetBranch }}){{ end }} by {{ .Curr.Author }}<br/>
Message: {{ .Curr.Message }}
type: string
required: false

View File

@ -14,7 +14,7 @@ import (
//nolint:lll
const defaultTemplate = `
Status: **{{ .Pipeline.Status }}**<br/>
Build: [{{ .Repository.Owner }}/{{ .Repository.Name }}]({{ .Repository.Link }}){{ if .Curr.TargetBranch }} ({{ .Curr.TargetBranch }}){{ end }} by {{ .Curr.Author }}<br/>
Build: [{{ .Repository.Owner }}/{{ .Repository.Name }}]({{ .Pipeline.Link }}){{ if .Curr.TargetBranch }} ({{ .Curr.TargetBranch }}){{ end }} by {{ .Curr.Author }}<br/>
Message: {{ .Curr.Message }}
`