Skip to content

Conversation

lunny
Copy link
Member

@lunny lunny commented Jan 16, 2020

When a request to a route with repoassignment middleware, a permission will be loaded to ctx.Repo.Permission. So we could directly use that but not load it again.

This PR will remove these unnecessary permissions load.

@lunny lunny added the type/refactoring Existing code has been cleaned up. There should be no new functionality. label Jan 16, 2020
@codecov-io
Copy link

codecov-io commented Jan 16, 2020

Codecov Report

Merging #9796 into master will decrease coverage by 0.02%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #9796      +/-   ##
==========================================
- Coverage   42.19%   42.17%   -0.03%     
==========================================
  Files         603      603              
  Lines       78859    78862       +3     
==========================================
- Hits        33277    33258      -19     
- Misses      41507    41526      +19     
- Partials     4075     4078       +3
Impacted Files Coverage Δ
modules/markup/markdown/goldmark.go 66.37% <0%> (-1.82%) ⬇️
services/pull/check.go 48.64% <0%> (-6.76%) ⬇️
modules/process/manager.go 74.69% <0%> (-3.62%) ⬇️
services/pull/temp_repo.go 31.62% <0%> (-2.57%) ⬇️
models/error.go 30.76% <0%> (-0.55%) ⬇️

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 31eeb5d...a465b4a. Read the comment docs.

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Jan 16, 2020
@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 Jan 16, 2020
@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 Jan 16, 2020
@sapk sapk merged commit dbd89ac into go-gitea:master Jan 16, 2020
@lunny lunny deleted the lunny/remove_unnecessary_perm_load branch January 16, 2020 15:46
@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
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.

9 participants