Skip to content

Commit

Permalink
[ACHIEVEMENT] The label maker achievemt (#38)
Browse files Browse the repository at this point in the history
* The label maker achievemt

Achievement for putting many labels in a pull request

* label maker - removed notes

* fix 2

removed double check if labels defined

* label maker ach - update 3

func update, and line spacing

* label maker - update 4

added brackets, tested, and 6 labels are now minimum

* label maker typo fixes+image rescale

* label maker image ratio fix+name fix
  • Loading branch information
dunaevsky committed Jan 27, 2017
1 parent ae2be13 commit 2dcacae
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions achievements/labelBabyJunior.achievement.js
@@ -0,0 +1,23 @@
var labelBabyJunior = {
name: 'Label Baby Junior',
check: function(pullRequest, shall) {
if (isManyLabels(pullRequest)) {
var achievement = {
avatar : 'images/achievements/theLabelMaker.achievement.jpg',
name: 'The Label Maker',
short: 'Is this a label maker?',
description: 'You\'ve put many labels, thank you for organizing. You\'re a gift that keeps on re-giving' ,
relatedPullRequest: pullRequest._id
};

shall.grant(pullRequest.creator.username, achievement);
}
}
};

function isManyLabels(pullRequest) {
var labels = pullRequest.labels;
return labels && labels.length > 5;
}

module.exports = labelBabyJunior;
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 2dcacae

Please sign in to comment.