summaryrefslogtreecommitdiffstats
path: root/routers
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2019-12-15 11:28:51 +0800
committerAntoine GIRARD <sapk@users.noreply.github.com>2019-12-15 04:28:51 +0100
commitce2d488c9497c12105935d363b66136a0c2bd0b5 (patch)
tree65f73708a844d3fb7a5e05290fc6c0ddf5cfafdd /routers
parent6715677b2bf7a065d0184ea7f2647e70ca2598d4 (diff)
downloadgitea-ce2d488c9497c12105935d363b66136a0c2bd0b5.tar.gz
gitea-ce2d488c9497c12105935d363b66136a0c2bd0b5.zip
Move PushToBaseRepo from models to services/pull (#9352)
Diffstat (limited to 'routers')
-rw-r--r--routers/api/v1/repo/pull.go3
-rw-r--r--routers/repo/pull.go3
2 files changed, 0 insertions, 6 deletions
diff --git a/routers/api/v1/repo/pull.go b/routers/api/v1/repo/pull.go
index 93fa6ad276..1c273b7dc9 100644
--- a/routers/api/v1/repo/pull.go
+++ b/routers/api/v1/repo/pull.go
@@ -307,9 +307,6 @@ func CreatePullRequest(ctx *context.APIContext, form api.CreatePullRequestOption
}
ctx.Error(500, "NewPullRequest", err)
return
- } else if err := pr.PushToBaseRepo(); err != nil {
- ctx.Error(500, "PushToBaseRepo", err)
- return
}
notification.NotifyNewPullRequest(pr)
diff --git a/routers/repo/pull.go b/routers/repo/pull.go
index c791bc55d9..559d9b267a 100644
--- a/routers/repo/pull.go
+++ b/routers/repo/pull.go
@@ -813,9 +813,6 @@ func CompareAndPullRequestPost(ctx *context.Context, form auth.CreateIssueForm)
}
ctx.ServerError("NewPullRequest", err)
return
- } else if err := pullRequest.PushToBaseRepo(); err != nil {
- ctx.ServerError("PushToBaseRepo", err)
- return
}
notification.NotifyNewPullRequest(pullRequest)