Skip to content

Commit 405e2fd

Browse files
committed
cmd/gopherbot: change issue nitification comment to include authoer name
1 parent 62382bd commit 405e2fd

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

cmd/gopherbot/gopherbot.go

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -831,7 +831,7 @@ func (b *gopherbot) cl2issue(ctx context.Context) error {
831831
continue
832832
}
833833
hasComment := false
834-
substr := fmt.Sprintf("Change https://golang.org/cl/%d by %s mentions this issue: `%s`", cl.Number)
834+
substr := fmt.Sprintf("Change https://golang.org/cl/%d mentions this issue.", cl.Number)
835835
gi.ForeachComment(func(c *maintner.GitHubComment) error {
836836
if strings.Contains(c.Body, substr) {
837837
hasComment = true
@@ -841,11 +841,9 @@ func (b *gopherbot) cl2issue(ctx context.Context) error {
841841
})
842842
if !hasComment {
843843
printIssue("cl2issue", gi)
844-
<<<<<<< HEAD
844+
845845
msg := fmt.Sprintf("Change https://golang.org/cl/%d by %s mentions this issue: `%s`", cl.Number, strings.Split("cl.Commit.Author", "<")[0], cl.Commit.Summary())
846-
=======
847-
msg := fmt.Sprintf("Change https://golang.org/cl/%d by @%s mentions this issue: `%s`", cl.Number, cl.Commit.Author, cl.Commit.Summary())
848-
>>>>>>> 04e54a31def4afb0784d367372b9736182f2e172
846+
849847
if err := b.addGitHubComment(ctx, "golang", "go", gi.Number, msg); err != nil {
850848
return err
851849
}

0 commit comments

Comments
 (0)