From 91596929f64127892de3e84b482ad9732c797e12 Mon Sep 17 00:00:00 2001 From: wangjr Date: Tue, 8 Mar 2022 10:34:27 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E4=BF=AE=E6=94=B91250=E5=85=B3=E8=81=94?= =?UTF-8?q?=E7=9A=841607=201605?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- options/locale/locale_zh-CN.ini | 2 +- templates/org/home.tmpl | 31 ++++++++++++++++++++++++++++--- 2 files changed, 29 insertions(+), 4 deletions(-) diff --git a/options/locale/locale_zh-CN.ini b/options/locale/locale_zh-CN.ini index 982dc1a49..3bce2aa20 100755 --- a/options/locale/locale_zh-CN.ini +++ b/options/locale/locale_zh-CN.ini @@ -2105,7 +2105,7 @@ select_again = 选择超过9个,请重新选择! custom_select_projects = 自定义精选项目 customize = 自定义 selected_project=精选项目 -fold = 折叠 +fold = 收起 unfold = 展开 form.name_reserved=组织名称 '%s' 是被保留的。 diff --git a/templates/org/home.tmpl b/templates/org/home.tmpl index 2715cb649..b929407ed 100755 --- a/templates/org/home.tmpl +++ b/templates/org/home.tmpl @@ -29,16 +29,17 @@
{{if .OrgTopics}} - {{$.i18n.Tr "org.all_org_topics"}} + {{$.i18n.Tr "org.all_org_topics"}} {{end}} {{range .OrgTopics}} {{if ne .Name ""}} - + {{.Name}} {{end}} {{end}} + {{if .OrgTopics}} @@ -136,14 +137,38 @@ \ No newline at end of file From f2650f13a5b772266735ba077d551d426efd9bfc Mon Sep 17 00:00:00 2001 From: lewis <747342561@qq.com> Date: Wed, 9 Mar 2022 14:38:43 +0800 Subject: [PATCH 2/3] fix 1608 --- routers/private/hook.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/routers/private/hook.go b/routers/private/hook.go index 79c8ecfc5..38abd4953 100755 --- a/routers/private/hook.go +++ b/routers/private/hook.go @@ -416,6 +416,10 @@ func HookPostReceive(ctx *macaron.Context, opts private.HookOptions) { copy(updates[1:], updates) updates[0] = &option } + + if err := updateRepoCommitCnt(ctx, repo); err != nil { + log.Error("updateRepoCommitCnt failed:%v", err.Error(), ctx.Data["MsgID"]) + } } } @@ -521,10 +525,6 @@ func HookPostReceive(ctx *macaron.Context, opts private.HookOptions) { } } - if err := updateRepoCommitCnt(ctx, repo); err != nil { - log.Error("updateRepoCommitCnt failed:%v", err.Error(), ctx.Data["MsgID"]) - } - ctx.JSON(http.StatusOK, private.HookPostReceiveResult{ Results: results, RepoWasEmpty: wasEmpty, From 0a01edfcb595db92b51afe5fe653d74c713ab4c9 Mon Sep 17 00:00:00 2001 From: zouap Date: Wed, 9 Mar 2022 16:51:08 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E6=A0=87=E7=AD=BE?= =?UTF-8?q?=E9=A6=96=E9=A1=B5=E9=93=BE=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zouap --- public/home/home.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/public/home/home.js b/public/home/home.js index 227f5b496..fd0bbf003 100644 --- a/public/home/home.js +++ b/public/home/home.js @@ -113,12 +113,18 @@ socket.onmessage = function (e) { html += recordPrefix + actionName; html += " " +getRepotext(record) + "" } - else if(record.OpType == "9" || record.OpType == "5"){ + else if(record.OpType == "5"){ branch = "" + record.RefName + "" actionName = actionName.replace("{branch}",branch); html += recordPrefix + actionName; html += " " + getRepotext(record) + "" - }else if(record.OpType == "17"){ + }else if(record.OpType == "9"){ + branch = "" + record.RefName + "" + actionName = actionName.replace("{branch}",branch); + html += recordPrefix + actionName; + html += " " + getRepotext(record) + "" + } + else if(record.OpType == "17"){ actionName = actionName.replace("{deleteBranchName}",record.RefName); var repoLink = "" + getRepotext(record) + "" actionName = actionName.replace("{repoName}",repoLink);