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 redudant CheckUnit calls in router #2627

Merged
merged 2 commits into from
Sep 30, 2017

Conversation

Morlinest
Copy link
Member

As title, little speed improvement.

@codecov-io
Copy link

codecov-io commented Sep 29, 2017

Codecov Report

Merging #2627 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@          Coverage Diff           @@
##           master   #2627   +/-   ##
======================================
  Coverage    27.3%   27.3%           
======================================
  Files          86      86           
  Lines       17139   17139           
======================================
  Hits         4680    4680           
  Misses      11781   11781           
  Partials      678     678

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 fbaa52a...947b3f9. Read the comment docs.

@tboerger tboerger added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Sep 29, 2017
@@ -479,7 +479,7 @@ func RegisterRoutes(m *macaron.Macaron) {
// FIXME: should use different URLs but mostly same logic for comments of issue and pull reuqest.
// So they can apply their own enable/disable logic on routers.
m.Group("/issues", func() {
m.Combo("/new", repo.MustEnableIssues).Get(context.RepoRef(), repo.NewIssue).
Copy link
Member

Choose a reason for hiding this comment

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

Seems no replacement for this removal?

Copy link
Member Author

Choose a reason for hiding this comment

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

Handler in parent func, line 509, use context.CheckUnit(models.UnitTypeIssues)

@lunny lunny added the type/refactoring Existing code has been cleaned up. There should be no new functionality. label Sep 30, 2017
@lunny lunny added this to the 1.3.0 milestone Sep 30, 2017
@lunny
Copy link
Member

lunny commented Sep 30, 2017

LGTM

@tboerger tboerger 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 Sep 30, 2017
@ethantkoenig
Copy link
Member

LGTM

@tboerger tboerger 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 Sep 30, 2017
@lunny lunny merged commit bae9cbc into go-gitea:master Sep 30, 2017
@Morlinest Morlinest deleted the fix/remove-redudant-router-handlers branch September 30, 2017 14:12
@go-gitea go-gitea locked and limited conversation to collaborators Nov 23, 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.

None yet

5 participants