diff options
author | wxiaoguang <wxiaoguang@gmail.com> | 2024-03-02 20:45:14 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-02 12:45:14 +0000 |
commit | e650f64d812f5ebeb4a11d2ec20f2376c6d963bc (patch) | |
tree | ed16e2e8a68b50ef03e6e1c6e8d17a64861c8dc8 /routers/web | |
parent | c0c2cb933bc59c5c9b2558c9bf53b495504f35f3 (diff) | |
download | gitea-e650f64d812f5ebeb4a11d2ec20f2376c6d963bc.tar.gz gitea-e650f64d812f5ebeb4a11d2ec20f2376c6d963bc.zip |
Fix incorrect redirection when creating a PR fails (#29537)
This is only a quick fix to make it easier to backport.
After this PR gets merged, I will propose a new PR to fix the FIXME.
<details>
![image](https://github.com/go-gitea/gitea/assets/2114189/98d1d5c4-2e79-4a75-80e9-76fd898986e0)
</details>
Diffstat (limited to 'routers/web')
-rw-r--r-- | routers/web/repo/pull.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/routers/web/repo/pull.go b/routers/web/repo/pull.go index c97edd8720..428fe23156 100644 --- a/routers/web/repo/pull.go +++ b/routers/web/repo/pull.go @@ -1501,7 +1501,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.JSONRedirect(ctx.Link + "?" + ctx.Req.URL.RawQuery) // FIXME: it's unfriendly, and will make the content lost return } ctx.ServerError("NewPullRequest", err) |