Skip to content

Commit

Permalink
[ACHIEVEMENT] Bi-winning achievement (#37)
Browse files Browse the repository at this point in the history
* bi-winning achievement for all commits having success statuses

* change <br> to \n :-)

* change the wording a bit
  • Loading branch information
thatkookooguy committed Jan 26, 2017
1 parent eb743ad commit 9bd8dd2
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 1 deletion.
30 changes: 30 additions & 0 deletions achievements/biWinning.achievement.js
@@ -0,0 +1,30 @@
var _ = require('lodash');

var biWinning = {
name: 'bi-winning',
check: function(pullRequest, shall) {
if (_.every(pullRequest.commits, allStatusesPassed)) {

var achievement = {
avatar: 'images/achievements/biWinning.achievement.jpg',
name: 'BI-WINNING!',
short: 'I\'m bi-winning. I win here and I win there',
description: [
'All the commits in your pull-request have passing statuses! WINNING!',
'\n\n',
'I\'m different. I have a different constitution, I have a different brain, I have a different heart. I got tiger blood, man. Dying\'s for fools, dying\'s for amateurs.'
].join(''),
relatedPullRequest: pullRequest._id
};

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


function allStatusesPassed(commit) {
return _.every(commit.statuses, { state: 'success' })
}

module.exports = biWinning;
2 changes: 1 addition & 1 deletion achievements/theGodfatherConsigliere.achievement.js
Expand Up @@ -8,7 +8,7 @@ var theGodfatherConsigliere = {
avatar : 'images/achievements/thegodfather.achievement.jpg',
name: 'The Godfather Consigliere',
short: 'Great men are not born great, they contribute to Kibibit . . . ',
description: 'You have contributed to Kibibit! We really appreciate it!<br>Accept this achievement as gift on my daughter\'s wedding day',
description: 'You have contributed to Kibibit! We really appreciate it!\nAccept this achievement as gift on my daughter\'s wedding day',
relatedPullRequest: pullRequest._id
};

Expand Down
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 9bd8dd2

Please sign in to comment.