Skip to content

Commit 8db0372

Browse files
CirnoTlafriks
andauthored
Handle NotifyCreateRef as create branch in feeds (#14245)
Co-authored-by: Lauris BH <[email protected]>
1 parent 3d38ecb commit 8db0372

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

options/locale/locale_en-US.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2495,6 +2495,7 @@ mirror_sync_delete = synced and deleted reference <code>%[2]s</code> at <a href=
24952495
approve_pull_request = `approved <a href="%s/pulls/%s">%s#%[2]s</a>`
24962496
reject_pull_request = `suggested changes for <a href="%s/pulls/%s">%s#%[2]s</a>`
24972497
publish_release = `released <a href="%s/releases/tag/%s"> "%[4]s" </a> at <a href="%[1]s">%[3]s</a>`
2498+
create_branch = created branch <a href="%[1]s/src/branch/%[2]s">%[3]s</a> in <a href="%[1]s">%[4]s</a>
24982499

24992500
[tool]
25002501
ago = %s ago

templates/user/dashboard/feeds.tmpl

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,11 @@
1818
{{$.i18n.Tr "action.rename_repo" .GetContent .GetRepoLink .ShortRepoPath | Str2html}}
1919
{{else if eq .GetOpType 5}}
2020
{{ $branchLink := .GetBranch | EscapePound | Escape}}
21-
{{$.i18n.Tr "action.commit_repo" .GetRepoLink $branchLink (Escape .GetBranch) .ShortRepoPath | Str2html}}
21+
{{if .Content}}
22+
{{$.i18n.Tr "action.commit_repo" .GetRepoLink $branchLink (Escape .GetBranch) .ShortRepoPath | Str2html}}
23+
{{else}}
24+
{{$.i18n.Tr "action.create_branch" .GetRepoLink $branchLink (Escape .GetBranch) .ShortRepoPath | Str2html}}
25+
{{end}}
2226
{{else if eq .GetOpType 6}}
2327
{{ $index := index .GetIssueInfos 0}}
2428
{{$.i18n.Tr "action.create_issue" .GetRepoLink $index .ShortRepoPath | Str2html}}

0 commit comments

Comments
 (0)