summaryrefslogtreecommitdiffstats
path: root/routers
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2019-11-29 10:21:05 +0800
committerGitHub <noreply@github.com>2019-11-29 10:21:05 +0800
commite151674cfa4255938f974cfb050b5222db77dcf5 (patch)
tree6b23a3b59643ce9fb385d5a67c213249b14cf113 /routers
parent54dab5aed999c1c3c0dd247de54a9cc2f9e6ebef (diff)
downloadgitea-e151674cfa4255938f974cfb050b5222db77dcf5.tar.gz
gitea-e151674cfa4255938f974cfb050b5222db77dcf5.zip
Move PushUpdateOptions from models to repofiles (#9124)
Diffstat (limited to 'routers')
-rw-r--r--routers/private/hook.go2
-rw-r--r--routers/private/push_update.go2
-rw-r--r--routers/repo/branch.go2
3 files changed, 3 insertions, 3 deletions
diff --git a/routers/private/hook.go b/routers/private/hook.go
index 074e3aef19..c9065bceb3 100644
--- a/routers/private/hook.go
+++ b/routers/private/hook.go
@@ -159,7 +159,7 @@ func HookPostReceive(ctx *macaron.Context) {
})
return
}
- if err := repofiles.PushUpdate(repo, branch, models.PushUpdateOptions{
+ if err := repofiles.PushUpdate(repo, branch, repofiles.PushUpdateOptions{
RefFullName: refFullName,
OldCommitID: oldCommitID,
NewCommitID: newCommitID,
diff --git a/routers/private/push_update.go b/routers/private/push_update.go
index 42eda3178b..d8102cbfbe 100644
--- a/routers/private/push_update.go
+++ b/routers/private/push_update.go
@@ -18,7 +18,7 @@ import (
// PushUpdate update public key updates
func PushUpdate(ctx *macaron.Context) {
- var opt models.PushUpdateOptions
+ var opt repofiles.PushUpdateOptions
if err := json.NewDecoder(ctx.Req.Request.Body).Decode(&opt); err != nil {
ctx.JSON(500, map[string]interface{}{
"err": err.Error(),
diff --git a/routers/repo/branch.go b/routers/repo/branch.go
index 0c06de3ea6..306deca36e 100644
--- a/routers/repo/branch.go
+++ b/routers/repo/branch.go
@@ -137,7 +137,7 @@ func deleteBranch(ctx *context.Context, branchName string) error {
if err := repofiles.PushUpdate(
ctx.Repo.Repository,
branchName,
- models.PushUpdateOptions{
+ repofiles.PushUpdateOptions{
RefFullName: git.BranchPrefix + branchName,
OldCommitID: commit.ID.String(),
NewCommitID: git.EmptySHA,