From c07e32023edd9493409286894e94efa97424b4f8 Mon Sep 17 00:00:00 2001 From: CaiCandong <1290147055@qq.com> Date: Tue, 1 Aug 2023 10:42:56 +0800 Subject: [PATCH 1/2] show correct prompt message --- routers/web/repo/pull.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/routers/web/repo/pull.go b/routers/web/repo/pull.go index d76e90bf248b8..adce102570fbd 100644 --- a/routers/web/repo/pull.go +++ b/routers/web/repo/pull.go @@ -1434,7 +1434,7 @@ func CompareAndPullRequestPost(ctx *context.Context) { return } ctx.Flash.Error(flashError) - ctx.JSONRedirect(pullIssue.Link()) // FIXME: it's unfriendly, and will make the content lost + ctx.JSONError(flashError) return } ctx.ServerError("NewPullRequest", err) From c4165d9861bcc8de2ce92fdb6eab88e13edf8b88 Mon Sep 17 00:00:00 2001 From: CaiCandong <50507092+CaiCandong@users.noreply.github.com> Date: Thu, 10 Aug 2023 11:36:46 +0800 Subject: [PATCH 2/2] Update routers/web/repo/pull.go Co-authored-by: yp05327 <576951401@qq.com> --- routers/web/repo/pull.go | 1 - 1 file changed, 1 deletion(-) diff --git a/routers/web/repo/pull.go b/routers/web/repo/pull.go index adce102570fbd..fb92bbfbc7742 100644 --- a/routers/web/repo/pull.go +++ b/routers/web/repo/pull.go @@ -1433,7 +1433,6 @@ func CompareAndPullRequestPost(ctx *context.Context) { ctx.ServerError("CompareAndPullRequest.HTMLString", err) return } - ctx.Flash.Error(flashError) ctx.JSONError(flashError) return }