diff options
Diffstat (limited to 'models/action.go')
-rw-r--r-- | models/action.go | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/models/action.go b/models/action.go index a88968d3..0c6637a0 100644 --- a/models/action.go +++ b/models/action.go @@ -335,7 +335,12 @@ func UpdateIssuesCommit(doer *User, repo *Repository, commits []*PushCommit) err } refMarked[issue.ID] = true - message := fmt.Sprintf(`<a href="%s/commit/%s">%s</a>`, repo.Link(), c.Sha1, c.Message) + msgLines := strings.Split(c.Message, "\n") + shortMsg := msgLines[0] + if len(msgLines) > 2 { + shortMsg += "..." + } + message := fmt.Sprintf(`<a href="%s/commit/%s">%s</a>`, repo.Link(), c.Sha1, shortMsg) if err = CreateRefComment(doer, repo, issue, message, c.Sha1); err != nil { return err } |