Browse Source

Merge pull request '解决push tag报500错误的问题' (#1630) from fix-1608 into V20220314

Reviewed-on: https://git.openi.org.cn/OpenI/aiforge/pulls/1630
Reviewed-by: ychao_1983 <ychao_1983@sina.com>
pull/1632/head
ychao_1983 3 years ago
parent
commit
7923f14484
1 changed files with 4 additions and 4 deletions
  1. +4
    -4
      routers/private/hook.go

+ 4
- 4
routers/private/hook.go View File

@@ -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,


Loading…
Cancel
Save