swap url and linktext positions for slack

This commit is contained in:
Christopher Brickley 2014-11-04 14:39:33 -05:00
parent 91ca5fe5b9
commit 22698625ed
2 changed files with 2 additions and 2 deletions

View file

@ -42,7 +42,7 @@ func (s *Slack) getMessage(context *model.Request, message string) string {
// drone/drone#3333333 // drone/drone#3333333
linktext := context.Repo.Owner + "/" + context.Repo.Name + "#" + context.Commit.ShaShort() linktext := context.Repo.Owner + "/" + context.Repo.Name + "#" + context.Commit.ShaShort()
return fmt.Sprintf(message, linktext, url, context.Commit.Branch, context.Commit.Author) return fmt.Sprintf(message, url, linktext, context.Commit.Branch, context.Commit.Author)
} }
func (s *Slack) sendStarted(context *model.Request) error { func (s *Slack) sendStarted(context *model.Request) error {

View file

@ -23,7 +23,7 @@ var request = &model.Request{
} }
*/ */
var slackExpectedLink = "<owner/repo#abc|http://examplehost.com/examplegit.com/owner/repo/example/abc>" var slackExpectedLink = "<http://examplehost.com/examplegit.com/owner/repo/example/abc|owner/repo#abc>"
var slackExpectedBase = slackExpectedLink + " (example) by Test User" var slackExpectedBase = slackExpectedLink + " (example) by Test User"
func Test_slackStartedMessage(t *testing.T) { func Test_slackStartedMessage(t *testing.T) {