From 15397747cd6858437c18e5c26a871b51e0345322 Mon Sep 17 00:00:00 2001 From: Brad Rydzewski Date: Sun, 3 Aug 2014 21:36:54 -0700 Subject: [PATCH] improved email subject --- plugin/notify/email/email.go | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/plugin/notify/email/email.go b/plugin/notify/email/email.go index 60acc0709..8bdddfbc6 100644 --- a/plugin/notify/email/email.go +++ b/plugin/notify/email/email.go @@ -24,8 +24,7 @@ const ( ) const ( - SubjectSuccess = "[SUCCESS] %s/%s %s" - SubjectFailure = "[FAILURE] %s/%s %s" + Subject = "[%s] %s/%s (%s - %s)" ) var ( @@ -86,9 +85,11 @@ func (e *Email) sendFailure(context *model.Request) error { // generate the email subject var subject = fmt.Sprintf( - SubjectFailure, + Subject, + context.Commit.Status, context.Repo.Owner, context.Repo.Name, + context.Commit.Branch, context.Commit.ShaShort(), ) @@ -117,9 +118,11 @@ func (e *Email) sendSuccess(context *model.Request) error { // generate the email subject var subject = fmt.Sprintf( - SubjectSuccess, + Subject, + context.Commit.Status, context.Repo.Owner, context.Repo.Name, + context.Commit.Branch, context.Commit.ShaShort(), )