Skip to content

Conversation

lunny
Copy link
Member

@lunny lunny commented May 14, 2019

As title.

@lunny lunny added the type/refactoring Existing code has been cleaned up. There should be no new functionality. label May 14, 2019
@lunny lunny added this to the 1.9.0 milestone May 14, 2019
@codecov-io
Copy link

codecov-io commented May 14, 2019

Codecov Report

Merging #6941 into master will increase coverage by 0.01%.
The diff coverage is 44.44%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #6941      +/-   ##
==========================================
+ Coverage   41.39%   41.41%   +0.01%     
==========================================
  Files         441      441              
  Lines       59732    59718      -14     
==========================================
+ Hits        24729    24730       +1     
+ Misses      31764    31753      -11     
+ Partials     3239     3235       -4
Impacted Files Coverage Δ
routers/init.go 68.05% <ø> (-0.44%) ⬇️
routers/admin/admin.go 0% <0%> (ø) ⬆️
models/repo.go 47.88% <100%> (+0.2%) ⬆️
modules/setting/setting.go 47.6% <100%> (+0.18%) ⬆️
modules/setting/git.go 62.5% <100%> (+5.35%) ⬆️
modules/git/git.go 33.33% <18.18%> (-3.41%) ⬇️
modules/log/event.go 64.46% <0%> (-1.53%) ⬇️
routers/repo/view.go 43.03% <0%> (+1.01%) ⬆️
models/repo_list.go 67.89% <0%> (+1.05%) ⬆️
modules/log/file.go 77.62% <0%> (+2.09%) ⬆️

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 95d3d42...cf2a112. Read the comment docs.

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label May 14, 2019
@@ -210,7 +211,8 @@ func Config(ctx *context.Context) {
ctx.Data["DisableRouterLog"] = setting.DisableRouterLog
ctx.Data["RunUser"] = setting.RunUser
ctx.Data["RunMode"] = strings.Title(macaron.Env)
ctx.Data["GitVersion"] = setting.Git.Version
ver, _ := git.BinVersion()
ctx.Data["GitVersion"] = ver
Copy link
Member

Choose a reason for hiding this comment

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

I think you could do this in one line.

@lunny lunny force-pushed the lunny/refactor_newrepocontext branch from b2392d5 to 551b500 Compare May 14, 2019 15:33
@@ -931,6 +932,8 @@ func NewContext() {
sec = Cfg.Section("U2F")
U2F.TrustedFacets, _ = shellquote.Split(sec.Key("TRUSTED_FACETS").MustString(strings.TrimRight(AppURL, "/")))
U2F.AppID = sec.Key("APP_ID").MustString(strings.TrimRight(AppURL, "/"))

zip.Verbose = false
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we still need this? I'm not sure we use cae/zip elsewhere.

Copy link
Member Author

Choose a reason for hiding this comment

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

Don't know. Since this is a refactor PR, I just keep it.

@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 May 14, 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 May 14, 2019
@lunny lunny merged commit 710245e into go-gitea:master May 15, 2019
@lunny lunny deleted the lunny/refactor_newrepocontext branch May 15, 2019 12:05
jeffliu27 pushed a commit to jeffliu27/gitea that referenced this pull request Jul 18, 2019
…s/git (go-gitea#6941)

* refactor models.NewRepoContext to extract git related codes to modules/git

* fix imports

* refactor
@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