From d1149e70221a7501b7fae8db1b6ba22708e712e3 Mon Sep 17 00:00:00 2001 From: Chris Sexton Date: Sun, 3 Nov 2019 07:55:58 -0500 Subject: [PATCH] git: actually do the thing --- plugins/git/github.go | 6 +++--- plugins/git/gitlab.go | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/git/github.go b/plugins/git/github.go index c211a26..ec09bab 100644 --- a/plugins/git/github.go +++ b/plugins/git/github.go @@ -46,7 +46,7 @@ func (p *GitPlugin) githubEvent(w http.ResponseWriter, r *http.Request) { m, ) } - msg = commits + msg += commits case github.PullRequestPayload: pr := payload.(github.PullRequestPayload) if pr.Action != "opened" { @@ -56,7 +56,7 @@ func (p *GitPlugin) githubEvent(w http.ResponseWriter, r *http.Request) { } repo = pr.Repository.Name owner = pr.Repository.Owner.Login - msg = fmt.Sprintf("%s opened new pull request \"%s\" on %s: %s", + msg += fmt.Sprintf("%s opened new pull request \"%s\" on %s: %s", pr.PullRequest.User.Login, pr.PullRequest.Title, pr.Repository.Name, @@ -66,7 +66,7 @@ func (p *GitPlugin) githubEvent(w http.ResponseWriter, r *http.Request) { ping := payload.(github.PingPayload) repo = ping.Repository.Name owner = ping.Repository.Owner.Login - msg = fmt.Sprintf(icon+"Got a ping request on %s", repo) + msg += fmt.Sprintf(icon+"Got a ping request on %s", repo) default: log.Error().Interface("payload", payload).Msg("unknown event payload") w.WriteHeader(500) diff --git a/plugins/git/gitlab.go b/plugins/git/gitlab.go index 9855796..4469f3c 100644 --- a/plugins/git/gitlab.go +++ b/plugins/git/gitlab.go @@ -44,7 +44,7 @@ func (p *GitPlugin) gitlabEvent(w http.ResponseWriter, r *http.Request) { m, ) } - msg = commits + msg += commits default: w.WriteHeader(500) fmt.Fprintf(w, "unknown payload: %+v", payload)