mozillascience / PaperBadger

Issuing badges to credit authors for their work on academic papers
https://badges.mozillascience.org/
Mozilla Public License 2.0
95 stars 45 forks source link

Refactoring getBadges / getTheBadges #171

Closed abbycabs closed 8 years ago

abbycabs commented 8 years ago

In both /routes/papers/index.js and /routes/users/index.js, there are a lot of similarities between getBadges and getTheBadges. Refactor to reuse code.

https://github.com/mozillascience/PaperBadger/blob/master/src/routes/papers/index.js https://github.com/mozillascience/PaperBadger/blob/master/src/routes/users/index.js

More details: https://github.com/mozillascience/PaperBadger/pull/168#discussion_r55863246

AndreyK729 commented 8 years ago

I want to participate in GSoC, and I would like to help Mozilla Science Lab with Contributorship Badges for Science. Please, assign me to this issue, so I can prove myself worthy.

abbycabs commented 8 years ago

Hey @AndreyK729! You're welcome to send over a pull request with your updates on the issue! Happy to answer any questions you may have. You may find our gitter chat useful:

Join the chat at https://gitter.im/mozillascience/PaperBadger

jinankjain commented 8 years ago

@acabunoc I think you are talking about the getTheBadges function in both of them ?

jinankjain commented 8 years ago

@acabunoc Am I correct ?

geeeeeeeeek commented 8 years ago

@acabunoc still need a pull request? This issue has been opened for a long time. If has not been resolved, I will work on this.

abbycabs commented 8 years ago

Hey @jinankjain & @geeeeeeeeek - yes both getTheBadges and getBadges functions in both of them -- all four are similar.

I'd like unit tests first before these changes go in.

josmas commented 8 years ago

closing this one after merging #183 and #186