Move PushToBaseRepo from models to services/pull (#9352)
This commit is contained in:
parent
6715677b2b
commit
ce2d488c94
6 changed files with 57 additions and 53 deletions
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue