mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2025-01-05 10:20:36 +02:00
improved email subject
This commit is contained in:
parent
302a898848
commit
15397747cd
@ -24,8 +24,7 @@ const (
|
|||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
SubjectSuccess = "[SUCCESS] %s/%s %s"
|
Subject = "[%s] %s/%s (%s - %s)"
|
||||||
SubjectFailure = "[FAILURE] %s/%s %s"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
@ -86,9 +85,11 @@ func (e *Email) sendFailure(context *model.Request) error {
|
|||||||
|
|
||||||
// generate the email subject
|
// generate the email subject
|
||||||
var subject = fmt.Sprintf(
|
var subject = fmt.Sprintf(
|
||||||
SubjectFailure,
|
Subject,
|
||||||
|
context.Commit.Status,
|
||||||
context.Repo.Owner,
|
context.Repo.Owner,
|
||||||
context.Repo.Name,
|
context.Repo.Name,
|
||||||
|
context.Commit.Branch,
|
||||||
context.Commit.ShaShort(),
|
context.Commit.ShaShort(),
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -117,9 +118,11 @@ func (e *Email) sendSuccess(context *model.Request) error {
|
|||||||
|
|
||||||
// generate the email subject
|
// generate the email subject
|
||||||
var subject = fmt.Sprintf(
|
var subject = fmt.Sprintf(
|
||||||
SubjectSuccess,
|
Subject,
|
||||||
|
context.Commit.Status,
|
||||||
context.Repo.Owner,
|
context.Repo.Owner,
|
||||||
context.Repo.Name,
|
context.Repo.Name,
|
||||||
|
context.Commit.Branch,
|
||||||
context.Commit.ShaShort(),
|
context.Commit.ShaShort(),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user