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

Remove unnecessary attributes of User struct #17745

Merged
merged 7 commits into from
Nov 22, 2021

Conversation

lunny
Copy link
Member

@lunny lunny commented Nov 21, 2021

remove unnecessary attributes of User struct

@lunny lunny added the type/refactoring Existing code has been cleaned up. There should be no new functionality. label Nov 21, 2021
@lunny lunny changed the title Remove unnecessary functions of User struct Remove unnecessary attributes of User struct Nov 21, 2021
Copy link
Contributor

@Gusted Gusted left a comment

Choose a reason for hiding this comment

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

Just a few nitpicks otherwise it will L G TM

modules/context/repo.go Outdated Show resolved Hide resolved
routers/web/repo/branch.go Outdated Show resolved Hide resolved
routers/web/user/home.go Outdated Show resolved Hide resolved
routers/web/user/profile.go Show resolved Hide resolved
routers/web/user/profile.go Show resolved Hide resolved
routers/api/v1/user/follower.go Outdated Show resolved Hide resolved
routers/api/v1/user/follower.go Show resolved Hide resolved
routers/api/v1/repo/pull.go Outdated Show resolved Hide resolved
routers/api/v1/org/member.go Outdated Show resolved Hide resolved
@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Nov 22, 2021
@lunny lunny force-pushed the lunny/remove_user_orgs branch 3 times, most recently from 4bfb85a to 48c44e2 Compare November 22, 2021 10:24
@codecov-commenter
Copy link

Codecov Report

Merging #17745 (48c44e2) into main (58ff86e) will increase coverage by 0.00%.
The diff coverage is 39.44%.

❗ Current head 48c44e2 differs from pull request most recent head e60beb8. Consider uploading reports for the commit e60beb8 to get more accurate results
Impacted file tree graph

@@           Coverage Diff           @@
##             main   #17745   +/-   ##
=======================================
  Coverage   45.55%   45.55%           
=======================================
  Files         808      808           
  Lines       89908    89913    +5     
=======================================
+ Hits        40959    40963    +4     
  Misses      42400    42400           
- Partials     6549     6550    +1     
Impacted Files Coverage Δ
cmd/admin.go 0.00% <0.00%> (ø)
models/user_email.go 43.41% <0.00%> (-3.65%) ⬇️
routers/api/v1/org/member.go 18.94% <0.00%> (-0.84%) ⬇️
routers/api/v1/user/follower.go 0.00% <0.00%> (ø)
routers/api/v1/user/user.go 52.50% <0.00%> (ø)
routers/web/admin/users.go 40.78% <0.00%> (ø)
routers/web/org/home.go 60.39% <ø> (ø)
routers/web/org/setting.go 0.00% <0.00%> (ø)
routers/web/user/auth.go 12.06% <0.00%> (ø)
routers/web/user/setting/account.go 27.47% <0.00%> (ø)
... and 32 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 58ff86e...e60beb8. Read the comment docs.

Copy link
Contributor

@Gusted Gusted left a comment

Choose a reason for hiding this comment

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

LGTM

@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 Nov 22, 2021
@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 Nov 22, 2021
@lunny lunny merged commit baed01f into go-gitea:main Nov 22, 2021
@lunny lunny deleted the lunny/remove_user_orgs branch November 22, 2021 15:21
Chianina pushed a commit to Chianina/gitea that referenced this pull request Mar 28, 2022
* Remove unnecessary functions of User struct

* Move more database methods out of user struct

* Move more database methods out of user struct

* Fix template failure

* Fix bug

* Remove finished FIXME

* remove unnecessary code
@go-gitea go-gitea locked and limited conversation to collaborators Apr 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. 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