summaryrefslogtreecommitdiffstats
path: root/routers/private
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2020-10-31 05:59:02 +0800
committerGitHub <noreply@github.com>2020-10-30 22:59:02 +0100
commit4df2ed29f28194513c59733e369152b8f8bc1d36 (patch)
tree3bb0604e902390f37e2c9a8104f4ccaf495b4291 /routers/private
parentdd12384f224e98a130511ebc9ffcfb44ead0e736 (diff)
downloadgitea-4df2ed29f28194513c59733e369152b8f8bc1d36.tar.gz
gitea-4df2ed29f28194513c59733e369152b8f8bc1d36.zip
Refactor: Move PushUpdateOptions (#13363)
Co-authored-by: Antoine GIRARD <sapk@users.noreply.github.com>
Diffstat (limited to 'routers/private')
-rw-r--r--routers/private/hook.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/routers/private/hook.go b/routers/private/hook.go
index a2033fc1dd..dac3940756 100644
--- a/routers/private/hook.go
+++ b/routers/private/hook.go
@@ -18,6 +18,7 @@ import (
"code.gitea.io/gitea/modules/git"
"code.gitea.io/gitea/modules/log"
"code.gitea.io/gitea/modules/private"
+ repo_module "code.gitea.io/gitea/modules/repository"
"code.gitea.io/gitea/modules/setting"
"code.gitea.io/gitea/modules/util"
pull_service "code.gitea.io/gitea/services/pull"
@@ -375,7 +376,7 @@ func HookPostReceive(ctx *macaron.Context, opts private.HookOptions) {
repoName := ctx.Params(":repo")
var repo *models.Repository
- updates := make([]*repo_service.PushUpdateOptions, 0, len(opts.OldCommitIDs))
+ updates := make([]*repo_module.PushUpdateOptions, 0, len(opts.OldCommitIDs))
wasEmpty := false
for i := range opts.OldCommitIDs {
@@ -402,7 +403,7 @@ func HookPostReceive(ctx *macaron.Context, opts private.HookOptions) {
wasEmpty = repo.IsEmpty
}
- option := repo_service.PushUpdateOptions{
+ option := repo_module.PushUpdateOptions{
RefFullName: refFullName,
OldCommitID: opts.OldCommitIDs[i],
NewCommitID: opts.NewCommitIDs[i],