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(models/attachement): use getAttachmentsByUUIDs #9317

Merged
merged 2 commits into from
Dec 11, 2019

Conversation

sapk
Copy link
Member

@sapk sapk commented Dec 10, 2019

Following #9309, I extracted a refactor from #7956 of common code already existing. And add a unit test.

This simplify code and make only one request to database for the attachement list.

@GiteaBot GiteaBot added the lgtm/need 1 This PR needs approval from one additional maintainer to be merged. label Dec 10, 2019
@sapk sapk added the type/refactoring Existing code has been cleaned up. There should be no new functionality. label Dec 10, 2019
@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 Dec 10, 2019
@codecov-io
Copy link

Codecov Report

Merging #9317 into master will increase coverage by 0.01%.
The diff coverage is 50%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master   #9317      +/-   ##
=========================================
+ Coverage   41.18%   41.2%   +0.01%     
=========================================
  Files         559     559              
  Lines       73115   73109       -6     
=========================================
+ Hits        30114   30122       +8     
+ Misses      39225   39211      -14     
  Partials     3776    3776
Impacted Files Coverage Δ
models/attachment.go 55.62% <100%> (+4.62%) ⬆️
models/issue_comment.go 43.13% <33.33%> (+0.27%) ⬆️
models/release.go 52.07% <33.33%> (+0.94%) ⬆️
modules/log/event.go 64.61% <0%> (-1.03%) ⬇️
models/repo_list.go 74.07% <0%> (+0.92%) ⬆️

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 50da9f7...b8ea125. Read the comment docs.

@zeripath zeripath merged commit c3d31e5 into go-gitea:master Dec 11, 2019
@sapk sapk deleted the refactor-attachement branch December 11, 2019 00:06
@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.

6 participants