diff --git a/routers/api/v1/repo/pull.go b/routers/api/v1/repo/pull.go index fe23f89fbc6..b4a48a3c8bf 100644 --- a/routers/api/v1/repo/pull.go +++ b/routers/api/v1/repo/pull.go @@ -419,7 +419,7 @@ func CreatePullRequest(ctx *context.APIContext) { } defer ci.Close() - if ci.IsPull() { + if !ci.IsPull() { ctx.Error(http.StatusUnprocessableEntity, "Bad base or head refs", "Only support branch to branch comparison") return }