From 52639ffaa9d78df339984346e2f290099ae9c068 Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Wed, 11 Dec 2024 15:41:02 -0800 Subject: [PATCH] Fix bug --- routers/api/v1/repo/pull.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 }