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/public/home/home.js b/public/home/home.js index 385c1c4bf..7512a4423 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); 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, 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 @@