Skip to content
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 link-action redirect network error #27734

Merged
merged 9 commits into from
Oct 23, 2023
Merged

Conversation

lng2020
Copy link
Member

@lng2020 lng2020 commented Oct 22, 2023

image

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Oct 22, 2023
@pull-request-size pull-request-size bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Oct 22, 2023
@lng2020 lng2020 changed the title Fix project board close/open issue Fix project close/open network error Oct 22, 2023
@lunny
Copy link
Member

lunny commented Oct 22, 2023

We need a return on line 171

@lunny lunny added the type/bug label Oct 22, 2023
@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Oct 22, 2023
routers/web/repo/projects.go Outdated Show resolved Hide resolved
@6543
Copy link
Member

6543 commented Oct 22, 2023

@lng2020 since what version do this issue exist?

@lng2020 lng2020 added the backport/v1.21 This PR should be backported to Gitea 1.21 label Oct 22, 2023
@lng2020
Copy link
Member Author

lng2020 commented Oct 22, 2023

From my test, 1.20 is okay. Probably because they changed the frontend redirect logic code several months ago.
Edit: #26535 is the PR

@yp05327
Copy link
Contributor

yp05327 commented Oct 23, 2023

The behavior of link-action was changed in that PR.

It seems that all of them are broken.
For example:
open or close milestone also has this issue.
image

@lng2020
Copy link
Member Author

lng2020 commented Oct 23, 2023

Yes. If the frontend uses link-action, the backend counterpart should use JSONRedirect instead of Redirect.

@lng2020
Copy link
Member Author

lng2020 commented Oct 23, 2023

From my test, the milestone and project are the only two occasions that encounter this error. Will fix the milestone issue in this PR too.
Update: Fixed

@pull-request-size pull-request-size bot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Oct 23, 2023
@lng2020 lng2020 changed the title Fix project close/open network error Fix link-action redirect network error Oct 23, 2023
@GiteaBot GiteaBot removed the lgtm/need 1 This PR needs approval from one additional maintainer to be merged. label Oct 23, 2023
@GiteaBot GiteaBot added the lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. label Oct 23, 2023
@lunny lunny added the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Oct 23, 2023
@lunny lunny merged commit 61d94b2 into go-gitea:main Oct 23, 2023
24 checks passed
@GiteaBot GiteaBot added this to the 1.22.0 milestone Oct 23, 2023
@GiteaBot GiteaBot removed the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Oct 23, 2023
GiteaBot pushed a commit to GiteaBot/gitea that referenced this pull request Oct 23, 2023
@GiteaBot GiteaBot added the backport/done All backports for this PR have been created label Oct 23, 2023
lunny pushed a commit that referenced this pull request Oct 23, 2023
Backport #27734 by @lng2020

<img width="823" alt="image"
src="https://github.com/go-gitea/gitea/assets/70063547/99da3d5a-c28a-4fd0-8ae0-88461a9142e2">

Co-authored-by: Nanguan Lin <70063547+lng2020@users.noreply.github.com>
Co-authored-by: 6543 <6543@obermui.de>
zjjhot added a commit to zjjhot/gitea that referenced this pull request Oct 24, 2023
* giteaofficial/main:
  Do not force creation of _cargo-index repo on publish (go-gitea#27266)
  Upgrade to golangci-lint@v1.55.0 (go-gitea#27756)
  Fix incorrect "tab" parameter for repo search sub-template (go-gitea#27755)
  Fix label render containing invalid HTML (go-gitea#27752)
  Fix duplicate project board when hitting `enter` key (go-gitea#27746)
  Fix `link-action` redirect network error (go-gitea#27734)
@lng2020 lng2020 deleted the fix_project_board branch November 7, 2023 07:49
fuxiaohei pushed a commit to fuxiaohei/gitea that referenced this pull request Jan 17, 2024
@go-gitea go-gitea locked as resolved and limited conversation to collaborators Jan 21, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
backport/done All backports for this PR have been created backport/v1.21 This PR should be backported to Gitea 1.21 lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. type/bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants