all-contributors-cli
Advanced tools
Comparing version 2.0.0-beta10 to 2.0.0-beta11
@@ -7,2 +7,16 @@ 'use strict'; | ||
var contributionChoices = _.flow( | ||
util.contributionTypes, | ||
_.toPairs, | ||
_.sortBy(function (pair) { | ||
return pair[1].description; | ||
}), | ||
_.map(function (pair) { | ||
return { | ||
name: pair[1].symbol + ' ' + pair[1].description, | ||
value: pair[0] | ||
}; | ||
}) | ||
); | ||
function getQuestions(options, username, contributions) { | ||
@@ -19,3 +33,3 @@ return [{ | ||
when: !contributions, | ||
choices: Object.keys(util.contributionTypes(options)) | ||
choices: contributionChoices(options) | ||
}]; | ||
@@ -22,0 +36,0 @@ } |
@@ -19,3 +19,3 @@ import test from 'ava'; | ||
t.is(formatContributionType(options, contributor, 'tool'), '🔧'); | ||
t.is(formatContributionType(options, contributor, 'question'), '❓'); | ||
t.is(formatContributionType(options, contributor, 'question'), '💁'); | ||
}); | ||
@@ -22,0 +22,0 @@ |
@@ -28,3 +28,3 @@ import test from 'ava'; | ||
const expected = '[![Kent C. Dodds](https://avatars1.githubusercontent.com/u/1500684?s=150)<br /><sub>Kent C. Dodds</sub>](http://kentcdodds.com)<br />[📖](https://github.com/jfmengels/all-contributors-cli/commits?author=kentcdodds) 👀 ❓'; | ||
const expected = '[![Kent C. Dodds](https://avatars1.githubusercontent.com/u/1500684?s=150)<br /><sub>Kent C. Dodds</sub>](http://kentcdodds.com)<br />[📖](https://github.com/jfmengels/all-contributors-cli/commits?author=kentcdodds) 👀 💁'; | ||
@@ -31,0 +31,0 @@ t.is(formatContributor(options, contributor), expected); |
@@ -9,5 +9,9 @@ 'use strict'; | ||
var defaultTypes = { | ||
blog: {symbol: '📝'}, | ||
blog: { | ||
symbol: '📝', | ||
description: 'Blogposts' | ||
}, | ||
bug: { | ||
symbol: '🐛', | ||
description: 'Bug reports', | ||
link: linkToIssues | ||
@@ -17,22 +21,59 @@ }, | ||
symbol: '💻', | ||
description: 'Code', | ||
link: linkToCommits | ||
}, | ||
design: {symbol: '🎨'}, | ||
design: { | ||
symbol: '🎨', | ||
description: 'Design' | ||
}, | ||
doc: { | ||
symbol: '📖', | ||
description: 'Documentation', | ||
link: linkToCommits | ||
}, | ||
example: {symbol: '💡'}, | ||
plugin: {symbol: '🔌'}, | ||
question: {symbol: '❓'}, | ||
review: {symbol: '👀'}, | ||
talk: {symbol: '📢'}, | ||
example: { | ||
symbol: '💡', | ||
description: 'Examples' | ||
}, | ||
infra: { | ||
symbol: '🚇', | ||
description: 'Infrastructure (Hosting, Build-Tools, etc)' | ||
}, | ||
plugin: { | ||
symbol: '🔌', | ||
description: 'Plugin/utility libraries' | ||
}, | ||
question: { | ||
symbol: '💁', | ||
description: 'Answering Questions' | ||
}, | ||
review: { | ||
symbol: '👀', | ||
description: 'Reviewed Pull Requests' | ||
}, | ||
talk: { | ||
symbol: '📢', | ||
description: 'Talks' | ||
}, | ||
test: { | ||
symbol: '⚠️', | ||
description: 'Tests', | ||
link: linkToCommits | ||
}, | ||
translation: {symbol: '🌍'}, | ||
tool: {symbol: '🔧'}, | ||
tutorial: {symbol: '✅'}, | ||
video: {symbol: '📹'} | ||
translation: { | ||
symbol: '🌍', | ||
description: 'Translation' | ||
}, | ||
tool: { | ||
symbol: '🔧', | ||
description: 'Tools' | ||
}, | ||
tutorial: { | ||
symbol: '✅', | ||
description: 'Tutorials' | ||
}, | ||
video: { | ||
symbol: '📹', | ||
description: 'Videos' | ||
} | ||
}; | ||
@@ -39,0 +80,0 @@ |
{ | ||
"name": "all-contributors-cli", | ||
"version": "2.0.0-beta10", | ||
"version": "2.0.0-beta11", | ||
"description": "Tool to easily add recognition for new contributors", | ||
@@ -5,0 +5,0 @@ "bin": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
46496
1248