summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCirno the Strongest <1447794+CirnoT@users.noreply.github.com>2021-01-04 17:51:00 +0100
committerGitHub <noreply@github.com>2021-01-04 18:51:00 +0200
commit8db0372a45082c8827bdee1b449f618b393c026d (patch)
treeb0080e251917f21a6cba63ecb6cf90ea5ed06e4d
parent3d38ecb1fc4ecb1abcfce960d6630fab25497914 (diff)
downloadgitea-8db0372a45082c8827bdee1b449f618b393c026d.tar.gz
gitea-8db0372a45082c8827bdee1b449f618b393c026d.zip
Handle NotifyCreateRef as create branch in feeds (#14245)
Co-authored-by: Lauris BH <lauris@nix.lv>
-rw-r--r--options/locale/locale_en-US.ini1
-rw-r--r--templates/user/dashboard/feeds.tmpl6
2 files changed, 6 insertions, 1 deletions
diff --git a/options/locale/locale_en-US.ini b/options/locale/locale_en-US.ini
index ae72dff3ad..06471fd6c4 100644
--- a/options/locale/locale_en-US.ini
+++ b/options/locale/locale_en-US.ini
@@ -2495,6 +2495,7 @@ mirror_sync_delete = synced and deleted reference <code>%[2]s</code> at <a href=
approve_pull_request = `approved <a href="%s/pulls/%s">%s#%[2]s</a>`
reject_pull_request = `suggested changes for <a href="%s/pulls/%s">%s#%[2]s</a>`
publish_release = `released <a href="%s/releases/tag/%s"> "%[4]s" </a> at <a href="%[1]s">%[3]s</a>`
+create_branch = created branch <a href="%[1]s/src/branch/%[2]s">%[3]s</a> in <a href="%[1]s">%[4]s</a>
[tool]
ago = %s ago
diff --git a/templates/user/dashboard/feeds.tmpl b/templates/user/dashboard/feeds.tmpl
index ead8e76f31..744e028bc2 100644
--- a/templates/user/dashboard/feeds.tmpl
+++ b/templates/user/dashboard/feeds.tmpl
@@ -18,7 +18,11 @@
{{$.i18n.Tr "action.rename_repo" .GetContent .GetRepoLink .ShortRepoPath | Str2html}}
{{else if eq .GetOpType 5}}
{{ $branchLink := .GetBranch | EscapePound | Escape}}
- {{$.i18n.Tr "action.commit_repo" .GetRepoLink $branchLink (Escape .GetBranch) .ShortRepoPath | Str2html}}
+ {{if .Content}}
+ {{$.i18n.Tr "action.commit_repo" .GetRepoLink $branchLink (Escape .GetBranch) .ShortRepoPath | Str2html}}
+ {{else}}
+ {{$.i18n.Tr "action.create_branch" .GetRepoLink $branchLink (Escape .GetBranch) .ShortRepoPath | Str2html}}
+ {{end}}
{{else if eq .GetOpType 6}}
{{ $index := index .GetIssueInfos 0}}
{{$.i18n.Tr "action.create_issue" .GetRepoLink $index .ShortRepoPath | Str2html}}