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

Refactor web routes #30519

Merged
merged 3 commits into from Apr 17, 2024
Merged

Refactor web routes #30519

merged 3 commits into from Apr 17, 2024

Conversation

wxiaoguang
Copy link
Contributor

@wxiaoguang wxiaoguang commented Apr 16, 2024

Re-organize the routes in web.go and use ctx constants instead of context.UnitTypes()

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Apr 16, 2024
@pull-request-size pull-request-size bot added the size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label Apr 16, 2024
@github-actions github-actions bot added the modifies/go Pull requests that update Go code label Apr 16, 2024
@github-actions github-actions bot added the modifies/templates This PR modifies the template files label Apr 16, 2024
@wxiaoguang wxiaoguang force-pushed the refactor-routes branch 2 times, most recently from a94ef9a to 2fd0b7a Compare April 16, 2024 09:02
@wxiaoguang wxiaoguang changed the title Refactor web routes WIP: Refactor web routes Apr 16, 2024
@wxiaoguang wxiaoguang force-pushed the refactor-routes branch 3 times, most recently from 121614e to a74db6e Compare April 16, 2024 11:47
@wxiaoguang
Copy link
Contributor Author

wxiaoguang commented Apr 16, 2024

CI passes, hopefully nothing breaks.

Even if there is any regression, it should be easy to fix, and I will fix in first time.

This PR is still far from ideal, it is only slightly better than before ..... so I guess there would need more fixes in the future.

@wxiaoguang wxiaoguang changed the title WIP: Refactor web routes Refactor web routes Apr 16, 2024
@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 Apr 16, 2024
routers/web/web.go Outdated Show resolved Hide resolved
@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Apr 17, 2024
@lunny
Copy link
Member

lunny commented Apr 17, 2024

per #30519 (comment)

@lunny lunny added the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Apr 17, 2024
@wxiaoguang wxiaoguang enabled auto-merge (squash) April 17, 2024 08:30
@wxiaoguang wxiaoguang merged commit 3e2e76e into go-gitea:main Apr 17, 2024
26 checks passed
@GiteaBot GiteaBot added this to the 1.23.0 milestone Apr 17, 2024
@GiteaBot GiteaBot removed the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Apr 17, 2024
@wxiaoguang wxiaoguang deleted the refactor-routes branch April 17, 2024 09:48
Copy link
Member

@delvh delvh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here's my review from before the PR was merged:

routers/web/web.go Outdated Show resolved Hide resolved
routers/web/web.go Show resolved Hide resolved
routers/web/web.go Show resolved Hide resolved
routers/web/web.go Show resolved Hide resolved
services/context/context.go Show resolved Hide resolved
zjjhot added a commit to zjjhot/gitea that referenced this pull request Apr 18, 2024
* giteaofficial/main:
  Add an api test for updating user (go-gitea#30539)
  [skip ci] Updated translations via Crowdin
  Expose fuzzy search for issues/pulls (go-gitea#29701)
  Allow everyone to read or write a wiki by a repo unit setting (go-gitea#30495)
  Support nuspec manifest download for nuget packages (go-gitea#28921)
  Fix branch_protection api shows users/teams who has no readAccess (go-gitea#30291)
  Correct locale string rendering (go-gitea#30522)
  Run `go generate` and `go vet` on all packages (go-gitea#30529)
  Fix and tweak pull request commit list (go-gitea#30528)
  Refactor web routes (go-gitea#30519)
  Fix install page checkboxes and dropdown width (go-gitea#30526)

# Conflicts:
#	routers/web/user/home.go
#	templates/user/dashboard/issues.tmpl
lunny pushed a commit that referenced this pull request Apr 26, 2024
@wxiaoguang wxiaoguang added the type/refactoring Existing code has been cleaned up. There should be no new functionality. label Apr 27, 2024
@wxiaoguang wxiaoguang modified the milestones: 1.23.0, 1.22.0 Apr 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. modifies/go Pull requests that update Go code modifies/templates This PR modifies the template files size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. type/refactoring Existing code has been cleaned up. There should be no new functionality.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants