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

Use named ActionType constants in template helper #2545

Merged
merged 2 commits into from
Sep 20, 2017

Conversation

ethantkoenig
Copy link
Member

@ethantkoenig ethantkoenig commented Sep 19, 2017

Use constants instead of magic numbers in template helper. Also resolves a related TODO

cc @daviian

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

daviian commented Sep 19, 2017

Shouldn't this be a problem in https://github.com/go-gitea/gitea/blob/master/templates/user/dashboard/feeds.tmpl?

I thought eq is only for primitive types?

@tboerger tboerger added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Sep 19, 2017
@ethantkoenig
Copy link
Member Author

@daviian No, the template engine is smart enough to type-cast as needed. I ran it locally just to be sure.

@codecov-io
Copy link

Codecov Report

Merging #2545 into master will not change coverage.
The diff coverage is 0%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #2545   +/-   ##
=======================================
  Coverage   27.21%   27.21%           
=======================================
  Files          85       85           
  Lines       16955    16955           
=======================================
  Hits         4615     4615           
  Misses      11665    11665           
  Partials      675      675
Impacted Files Coverage Δ
models/action.go 50.11% <0%> (ø) ⬆️

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 a1ed239...f34c8bb. Read the comment docs.

@daviian
Copy link
Member

daviian commented Sep 19, 2017

LGTM 😄 even if it doesn't work for me^^

@lafriks
Copy link
Member

lafriks commented Sep 19, 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 19, 2017
@bkcsoft
Copy link
Member

bkcsoft commented Sep 19, 2017

LGTM

@bkcsoft
Copy link
Member

bkcsoft commented Sep 19, 2017

Make LG-TM work

@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 19, 2017
@daviian
Copy link
Member

daviian commented Sep 19, 2017

LGTM

@lunny lunny merged commit acecedc into go-gitea:master Sep 20, 2017
@ethantkoenig ethantkoenig deleted the cleanup/use_named_constants branch September 20, 2017 02:45
@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

7 participants