mirror of
https://github.com/gogs/gogs.git
synced 2025-10-07 23:21:48 +00:00
comment: only show title of commit message from a commit ref (#3206)
This commit is contained in:
parent
0cfa489cf0
commit
28983c94ff
2
gogs.go
2
gogs.go
@ -16,7 +16,7 @@ import (
|
|||||||
"github.com/gogits/gogs/modules/setting"
|
"github.com/gogits/gogs/modules/setting"
|
||||||
)
|
)
|
||||||
|
|
||||||
const APP_VER = "0.9.165.0221 / 0.10 RC"
|
const APP_VER = "0.9.165.0222 / 0.10 RC"
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
setting.AppVer = APP_VER
|
setting.AppVer = APP_VER
|
||||||
|
@ -335,7 +335,12 @@ func UpdateIssuesCommit(doer *User, repo *Repository, commits []*PushCommit) err
|
|||||||
}
|
}
|
||||||
refMarked[issue.ID] = true
|
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 {
|
if err = CreateRefComment(doer, repo, issue, message, c.Sha1); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
@ -1 +1 @@
|
|||||||
0.9.165.0221 / 0.10 RC
|
0.9.165.0222 / 0.10 RC
|
@ -138,7 +138,6 @@
|
|||||||
<img src="{{.Poster.RelAvatarLink}}">
|
<img src="{{.Poster.RelAvatarLink}}">
|
||||||
</a>
|
</a>
|
||||||
<span class="text grey"><a href="{{.Poster.HomeLink}}">{{.Poster.Name}}</a> {{$.i18n.Tr "repo.issues.commit_ref_at" .EventTag $createdStr | Safe}}</span>
|
<span class="text grey"><a href="{{.Poster.HomeLink}}">{{.Poster.Name}}</a> {{$.i18n.Tr "repo.issues.commit_ref_at" .EventTag $createdStr | Safe}}</span>
|
||||||
|
|
||||||
<div class="detail">
|
<div class="detail">
|
||||||
<span class="octicon octicon-git-commit"></span>
|
<span class="octicon octicon-git-commit"></span>
|
||||||
<span class="text grey">{{.Content | Str2html}}</span>
|
<span class="text grey">{{.Content | Str2html}}</span>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user