0
0
mirror of https://github.com/thegeeklab/wp-matrix.git synced 2024-11-24 23:30:40 +00:00
This commit is contained in:
Robert Kaussow 2023-08-16 10:38:12 +02:00
parent 80191043e8
commit 8c61fb69c5
Signed by: xoxys
GPG Key ID: 4E692A2EAECC03C0
5 changed files with 7 additions and 6 deletions

View File

@ -19,7 +19,6 @@ steps:
from_secret: matrix_roomid
username:
from_secret: matrix_username
template: "{{ .Pipeline }} ++ {{ .Repository }} ++ {{ .Curr }}"
when:
- status: [success, failure]

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 }}]({{ .Pipeline.Link }}){{ if .Curr.TargetBranch }} ({{ .Curr.TargetBranch }}){{ end }} by {{ .Curr.Author }}<br/>
Message: {{ .Curr.Message }}
Build: [{{ .Repository.Slug }}]({{ .Pipeline.URL }}){{ if .Curr.Branch }} ({{ .Curr.Branch }}){{ end }} by {{ .Curr.Author }}<br/>
Message: {{ .Curr.Message }}{{ if .Curr.URL }} ([source]({{ .Curr.URL }})){{ end }}
type: string
required: false

View File

@ -14,8 +14,8 @@ import (
//nolint:lll
const defaultTemplate = `
Status: **{{ .Pipeline.Status }}**<br/>
Build: [{{ .Repository.Owner }}/{{ .Repository.Name }}]({{ .Pipeline.Link }}){{ if .Curr.TargetBranch }} ({{ .Curr.TargetBranch }}){{ end }} by {{ .Curr.Author }}<br/>
Message: {{ .Curr.Message }}
Build: [{{ .Repository.Slug }}]({{ .Pipeline.URL }}){{ if .Curr.Branch }} ({{ .Curr.Branch }}){{ end }} by {{ .Curr.Author }}<br/>
Message: {{ .Curr.Message }}{{ if .Curr.URL }} ([source]({{ .Curr.URL }})){{ end }}
`
// settingsFlags has the cli.Flags for the plugin.Settings.

2
go.mod
View File

@ -7,7 +7,7 @@ require (
github.com/microcosm-cc/bluemonday v1.0.25
github.com/rs/zerolog v1.30.0
github.com/russross/blackfriday/v2 v2.1.0
github.com/thegeeklab/wp-plugin-go v0.2.2-0.20230816063606-7c3ed98b566a
github.com/thegeeklab/wp-plugin-go v0.2.2-0.20230816083104-032314d414ea
github.com/urfave/cli/v2 v2.25.7
maunium.net/go/mautrix v0.15.4
)

2
go.sum
View File

@ -61,6 +61,8 @@ github.com/thegeeklab/wp-plugin-go v0.2.0 h1:uQzyCNUS2CthdtL5OssprhFKxJoGVyuEXMU
github.com/thegeeklab/wp-plugin-go v0.2.0/go.mod h1:7PWAZiTnZ2fAvjsedopQJ6w873KuSxUWsAml1Yib8a0=
github.com/thegeeklab/wp-plugin-go v0.2.2-0.20230816063606-7c3ed98b566a h1:2SXI3FX9Sf/1LOUKezkBzTYLSzduNTjCspvC8ILqwe4=
github.com/thegeeklab/wp-plugin-go v0.2.2-0.20230816063606-7c3ed98b566a/go.mod h1:7PWAZiTnZ2fAvjsedopQJ6w873KuSxUWsAml1Yib8a0=
github.com/thegeeklab/wp-plugin-go v0.2.2-0.20230816083104-032314d414ea h1:T9AOBWIVFO7+jizbgXA1lwYjfM+IKZ6VgApq0PD922M=
github.com/thegeeklab/wp-plugin-go v0.2.2-0.20230816083104-032314d414ea/go.mod h1:7PWAZiTnZ2fAvjsedopQJ6w873KuSxUWsAml1Yib8a0=
github.com/tidwall/gjson v1.14.2/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk=
github.com/tidwall/gjson v1.14.4 h1:uo0p8EbA09J7RQaflQ1aBRffTR7xedD2bcIVSYxLnkM=
github.com/tidwall/gjson v1.14.4/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk=