mirror of
https://github.com/go-gitea/gitea
synced 2024-11-15 14:44:41 +00:00
Merge pull request #1994 from arthuroy/develop
Fix #1965 - the hyperlink and the display name of the branch
This commit is contained in:
commit
915bf1d2e3
@ -966,7 +966,7 @@ notices.delete_success = System notice has been deleted successfully.
|
|||||||
[action]
|
[action]
|
||||||
create_repo = created repository <a href="%s">%s</a>
|
create_repo = created repository <a href="%s">%s</a>
|
||||||
rename_repo = renamed repository from <code>%[1]s</code> to <a href="%[2]s">%[3]s</a>
|
rename_repo = renamed repository from <code>%[1]s</code> to <a href="%[2]s">%[3]s</a>
|
||||||
commit_repo = pushed to <a href="%s/src/%s">%[2]s</a> at <a href="%[1]s">%[3]s</a>
|
commit_repo = pushed to <a href="%[1]s/src/%[2]s">%[3]s</a> at <a href="%[1]s">%[4]s</a>
|
||||||
create_issue = `opened issue <a href="%s/issues/%s">%s#%[2]s</a>`
|
create_issue = `opened issue <a href="%s/issues/%s">%s#%[2]s</a>`
|
||||||
create_pull_request = `created pull request <a href="%s/pulls/%s">%s#%[2]s</a>`
|
create_pull_request = `created pull request <a href="%s/pulls/%s">%s#%[2]s</a>`
|
||||||
comment_issue = `commented on issue <a href="%s/issues/%s">%s#%[2]s</a>`
|
comment_issue = `commented on issue <a href="%s/issues/%s">%s#%[2]s</a>`
|
||||||
|
@ -35,6 +35,11 @@ func parsePrettyFormatLog(repo *Repository, logByts []byte) (*list.List, error)
|
|||||||
}
|
}
|
||||||
|
|
||||||
func RefEndName(refStr string) string {
|
func RefEndName(refStr string) string {
|
||||||
|
if strings.HasPrefix(refStr, "refs/heads/") {
|
||||||
|
// trim the "refs/heads/"
|
||||||
|
return refStr[len("refs/heads/"):]
|
||||||
|
}
|
||||||
|
|
||||||
index := strings.LastIndex(refStr, "/")
|
index := strings.LastIndex(refStr, "/")
|
||||||
if index != -1 {
|
if index != -1 {
|
||||||
return refStr[index+1:]
|
return refStr[index+1:]
|
||||||
|
@ -13,7 +13,8 @@
|
|||||||
{{else if eq .GetOpType 2}}
|
{{else if eq .GetOpType 2}}
|
||||||
{{$.i18n.Tr "action.rename_repo" .GetContent .GetRepoLink .GetRepoPath | Str2html}}
|
{{$.i18n.Tr "action.rename_repo" .GetContent .GetRepoLink .GetRepoPath | Str2html}}
|
||||||
{{else if eq .GetOpType 5}}
|
{{else if eq .GetOpType 5}}
|
||||||
{{$.i18n.Tr "action.commit_repo" .GetRepoLink .GetBranch .GetRepoPath | Str2html}}
|
{{ $branchLink := .GetBranch | EscapePound}}
|
||||||
|
{{$.i18n.Tr "action.commit_repo" .GetRepoLink $branchLink .GetBranch .GetRepoPath | Str2html}}
|
||||||
{{else if eq .GetOpType 6}}
|
{{else if eq .GetOpType 6}}
|
||||||
{{ $index := index .GetIssueInfos 0}}
|
{{ $index := index .GetIssueInfos 0}}
|
||||||
{{$.i18n.Tr "action.create_issue" .GetRepoLink $index .GetRepoPath | Str2html}}
|
{{$.i18n.Tr "action.create_issue" .GetRepoLink $index .GetRepoPath | Str2html}}
|
||||||
|
Loading…
Reference in New Issue
Block a user