-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix incorrect redirection when creating a PR fails #29537
Conversation
I removed all these |
@@ -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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it still unfriendly?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. See the description:
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, the filled form content will be lost because of the redirection. (The pull request title and content)
But it's the same behavior as before. So this can be resolved in future PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-> Make PR form use toast to show error message #29545
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>
* upstream/main: Fix a bug returning 404 when display a single tag with no release (go-gitea#29466) Add a check for when the command is canceled by the program on Window… (go-gitea#29538) Fix incorrect redirection when creating a PR fails (go-gitea#29537) Fix incorrect subpath in links (go-gitea#29535) Fix issue link does not support quotes (go-gitea#29484) (go-gitea#29487)
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.