mirror of
https://github.com/go-gitea/gitea.git
synced 2024-11-24 05:21:24 +08:00
* Deny wrong pull * Update routers/api/v1/repo/pull.go Co-authored-by: Markus <git+markus@obermui.de> Co-authored-by: zeripath <art27@cantab.net>
This commit is contained in:
parent
c9e6069970
commit
732f22ad7d
|
@ -201,6 +201,12 @@ func CreatePullRequest(ctx *context.APIContext, form api.CreatePullRequestOption
|
|||
// "422":
|
||||
// "$ref": "#/responses/validationError"
|
||||
|
||||
if form.Head == form.Base {
|
||||
ctx.Error(http.StatusUnprocessableEntity, "BaseHeadSame",
|
||||
"Invalid PullRequest: There are no changes between the head and the base")
|
||||
return
|
||||
}
|
||||
|
||||
var (
|
||||
repo = ctx.Repo.Repository
|
||||
labelIDs []int64
|
||||
|
|
Loading…
Reference in New Issue
Block a user