mirror of
https://github.com/all-contributors/cli.git
synced 2025-01-09 13:36:29 +00:00
feat: Add check command that compares GitHub contributors with credited ones (#58)
* feat: Add checking functionnality that compares contributors with GH data * fix(check): Use the info from config file, paginate GH data * doc(check): Document the new check command * fix(eslint): Add missing semicolon * tests: Add tests for utils.check * fix: Check for code and test only * refactor: use includes and correct awaits * refactor: more includes and template literals
This commit is contained in:
parent
b443c82b07
commit
88c7a29681
14 changed files with 8405 additions and 3 deletions
11
README.md
11
README.md
|
@ -75,6 +75,17 @@ Where `username` is the user's GitHub username, and `contribution` is a `,`-sepa
|
|||
- tutorial: [✅](# "Tutorials")
|
||||
- video: [📹](# "Videos")
|
||||
|
||||
### Check for missing contributors
|
||||
|
||||
Use `check` to compare contributors from GitHub with the ones credited in your `.all-contributorsrc` file, in order to make sure that credit is given where it's due.
|
||||
|
||||
```console
|
||||
all-contributors check
|
||||
```
|
||||
|
||||
> Due to GitHub API restrictions, this command only works for projects with less than 500 contributors.
|
||||
|
||||
|
||||
## Configuration
|
||||
|
||||
You can configure the project by updating the `.all-contributorsrc` JSON file. The data used to generate the contributors list will be stored in there, and you can configure how you want `all-contributors-cli` to generate the list.
|
||||
|
|
39
cli.js
39
cli.js
|
@ -4,6 +4,7 @@
|
|||
|
||||
var path = require('path');
|
||||
var yargs = require('yargs');
|
||||
var chalk = require('chalk');
|
||||
var inquirer = require('inquirer');
|
||||
|
||||
var init = require('./lib/init');
|
||||
|
@ -23,6 +24,8 @@ var argv = yargs
|
|||
.usage('Usage: $0 add <username> <contribution>')
|
||||
.command('init', 'Prepare the project to be used with this tool')
|
||||
.usage('Usage: $0 init')
|
||||
.command('check', 'Compares contributors from GitHub with the ones credited in .all-contributorsrc')
|
||||
.usage('Usage: $0 check')
|
||||
.boolean('commit')
|
||||
.default('files', ['README.md'])
|
||||
.default('contributorsPerLine', 7)
|
||||
|
@ -68,6 +71,37 @@ function addContribution(argv) {
|
|||
});
|
||||
}
|
||||
|
||||
function checkContributors() {
|
||||
var configData = util.configFile.readConfig(argv.config);
|
||||
|
||||
return util.check(configData.projectOwner, configData.projectName)
|
||||
.then(ghContributors => {
|
||||
var knownContributions = configData.contributors.reduce((obj, item) => {
|
||||
obj[item.login] = item.contributions;
|
||||
return obj;
|
||||
}, {});
|
||||
var knownContributors = configData.contributors.map(contributor => contributor.login);
|
||||
|
||||
var missingInConfig = ghContributors.filter(login => !knownContributors.includes(login));
|
||||
var missingFromGithub = knownContributors.filter(login => {
|
||||
return !ghContributors.includes(login) && (
|
||||
knownContributions[login].includes('code') ||
|
||||
knownContributions[login].includes('test')
|
||||
);
|
||||
});
|
||||
|
||||
if (missingInConfig.length) {
|
||||
process.stdout.write(chalk.bold('Missing contributors in .all-contributorsrc:\n'));
|
||||
process.stdout.write(` ${missingInConfig.join(', ')}\n`);
|
||||
}
|
||||
|
||||
if (missingFromGithub.length) {
|
||||
process.stdout.write(chalk.bold('Unknown contributors found in .all-contributorsrc:\n'));
|
||||
process.stdout.write(` ${missingFromGithub.join(', ')}\n`);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function onError(error) {
|
||||
if (error) {
|
||||
console.error(error.message);
|
||||
|
@ -87,6 +121,9 @@ function promptForCommand(argv) {
|
|||
}, {
|
||||
name: 'Re-generate the contributors list',
|
||||
value: 'generate'
|
||||
}, {
|
||||
name: 'Compare contributors from GitHub with the credited ones',
|
||||
value: 'check'
|
||||
}],
|
||||
when: !argv._[0],
|
||||
default: 0
|
||||
|
@ -107,6 +144,8 @@ promptForCommand(argv)
|
|||
return startGeneration(argv);
|
||||
case 'add':
|
||||
return addContribution(argv);
|
||||
case 'check':
|
||||
return checkContributors();
|
||||
default:
|
||||
throw new Error(`Unknown command ${command}`);
|
||||
}
|
||||
|
|
45
lib/util/check.js
Normal file
45
lib/util/check.js
Normal file
|
@ -0,0 +1,45 @@
|
|||
'use strict';
|
||||
|
||||
var pify = require('pify');
|
||||
var request = pify(require('request'));
|
||||
|
||||
function getNextLink(link) {
|
||||
if (!link) {
|
||||
return null;
|
||||
}
|
||||
|
||||
var nextLink = link.split(',').find(s => s.includes('rel="next"'));
|
||||
|
||||
if (!nextLink) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return nextLink.split(';')[0].slice(1, -1);
|
||||
}
|
||||
|
||||
function getContributorsPage(url) {
|
||||
return request.get({
|
||||
url: url,
|
||||
headers: {
|
||||
'User-Agent': 'request'
|
||||
}
|
||||
})
|
||||
.then(res => {
|
||||
var body = JSON.parse(res.body);
|
||||
var contributorsIds = body.map(contributor => contributor.login);
|
||||
|
||||
var nextLink = getNextLink(res.headers.link);
|
||||
if (nextLink) {
|
||||
return getContributorsPage(nextLink).then(nextContributors => {
|
||||
return contributorsIds.concat(nextContributors);
|
||||
});
|
||||
}
|
||||
|
||||
return contributorsIds;
|
||||
});
|
||||
}
|
||||
|
||||
module.exports = function getContributorsFromGithub(owner, name) {
|
||||
var url = `https://api.github.com/repos/${owner}/${name}/contributors?per_page=100`;
|
||||
return getContributorsPage(url);
|
||||
};
|
46
lib/util/check.test.js
Normal file
46
lib/util/check.test.js
Normal file
|
@ -0,0 +1,46 @@
|
|||
|
||||
import test from 'ava';
|
||||
import nock from 'nock';
|
||||
|
||||
var check = require('./check');
|
||||
import allContributorsCliResponse from './fixtures/all-contributors.response.json';
|
||||
import allContributorsCliTransformed from './fixtures/all-contributors.transformed.json';
|
||||
|
||||
import reactNativeResponse1 from './fixtures/react-native.response.1.json';
|
||||
import reactNativeResponse2 from './fixtures/react-native.response.2.json';
|
||||
import reactNativeResponse3 from './fixtures/react-native.response.3.json';
|
||||
import reactNativeResponse4 from './fixtures/react-native.response.4.json';
|
||||
import reactNativeTransformed from './fixtures/react-native.transformed.json';
|
||||
|
||||
test.before(() => {
|
||||
nock('https://api.github.com')
|
||||
.persist()
|
||||
.get('/repos/jfmengels/all-contributors-cli/contributors?per_page=100')
|
||||
.reply(200, allContributorsCliResponse)
|
||||
.get('/repos/facebook/react-native/contributors?per_page=100')
|
||||
.reply(200, reactNativeResponse1, {
|
||||
Link: '<https://api.github.com/repositories/29028775/contributors?per_page=100&page=2>; rel="next", <https://api.github.com/repositories/29028775/contributors?per_page=100&page=4>; rel="last"'
|
||||
})
|
||||
.get('/repositories/29028775/contributors?per_page=100&page=2')
|
||||
.reply(200, reactNativeResponse2, {
|
||||
Link: '<https://api.github.com/repositories/29028775/contributors?per_page=100&page=3>; rel="next", <https://api.github.com/repositories/29028775/contributors?per_page=100&page=4>; rel="last", <https://api.github.com/repositories/29028775/contributors?per_page=100&page=1>; rel="first", <https://api.github.com/repositories/29028775/contributors?per_page=100&page=1>; rel="prev"'
|
||||
})
|
||||
.get('/repositories/29028775/contributors?per_page=100&page=3')
|
||||
.reply(200, reactNativeResponse3, {
|
||||
Link: '<https://api.github.com/repositories/29028775/contributors?per_page=100&page=4>; rel="next", <https://api.github.com/repositories/29028775/contributors?per_page=100&page=4>; rel="last", <https://api.github.com/repositories/29028775/contributors?per_page=100&page=1>; rel="first", <https://api.github.com/repositories/29028775/contributors?per_page=100&page=2>; rel="prev"'
|
||||
})
|
||||
.get('/repositories/29028775/contributors?per_page=100&page=4')
|
||||
.reply(200, reactNativeResponse4, {
|
||||
Link: '<https://api.github.com/repositories/29028775/contributors?per_page=100&page=1>; rel="first", <https://api.github.com/repositories/29028775/contributors?per_page=100&page=3>; rel="prev"'
|
||||
});
|
||||
});
|
||||
|
||||
test('Handle a single results page correctly', async t => {
|
||||
const transformed = await check('jfmengels', 'all-contributors-cli');
|
||||
t.deepEqual(transformed, allContributorsCliTransformed);
|
||||
});
|
||||
|
||||
test('Handle multiple results pages correctly', async t => {
|
||||
const transformed = await check('facebook', 'react-native');
|
||||
t.deepEqual(transformed, reactNativeTransformed);
|
||||
});
|
323
lib/util/fixtures/all-contributors.response.json
Normal file
323
lib/util/fixtures/all-contributors.response.json
Normal file
|
@ -0,0 +1,323 @@
|
|||
|
||||
[
|
||||
{
|
||||
"login": "jfmengels",
|
||||
"id": 3869412,
|
||||
"avatar_url": "https://avatars1.githubusercontent.com/u/3869412?v=4",
|
||||
"gravatar_id": "",
|
||||
"url": "https://api.github.com/users/jfmengels",
|
||||
"html_url": "https://github.com/jfmengels",
|
||||
"followers_url": "https://api.github.com/users/jfmengels/followers",
|
||||
"following_url": "https://api.github.com/users/jfmengels/following{/other_user}",
|
||||
"gists_url": "https://api.github.com/users/jfmengels/gists{/gist_id}",
|
||||
"starred_url": "https://api.github.com/users/jfmengels/starred{/owner}{/repo}",
|
||||
"subscriptions_url": "https://api.github.com/users/jfmengels/subscriptions",
|
||||
"organizations_url": "https://api.github.com/users/jfmengels/orgs",
|
||||
"repos_url": "https://api.github.com/users/jfmengels/repos",
|
||||
"events_url": "https://api.github.com/users/jfmengels/events{/privacy}",
|
||||
"received_events_url": "https://api.github.com/users/jfmengels/received_events",
|
||||
"type": "User",
|
||||
"site_admin": false,
|
||||
"contributions": 74
|
||||
},
|
||||
{
|
||||
"login": "machour",
|
||||
"id": 304450,
|
||||
"avatar_url": "https://avatars2.githubusercontent.com/u/304450?v=4",
|
||||
"gravatar_id": "",
|
||||
"url": "https://api.github.com/users/machour",
|
||||
"html_url": "https://github.com/machour",
|
||||
"followers_url": "https://api.github.com/users/machour/followers",
|
||||
"following_url": "https://api.github.com/users/machour/following{/other_user}",
|
||||
"gists_url": "https://api.github.com/users/machour/gists{/gist_id}",
|
||||
"starred_url": "https://api.github.com/users/machour/starred{/owner}{/repo}",
|
||||
"subscriptions_url": "https://api.github.com/users/machour/subscriptions",
|
||||
"organizations_url": "https://api.github.com/users/machour/orgs",
|
||||
"repos_url": "https://api.github.com/users/machour/repos",
|
||||
"events_url": "https://api.github.com/users/machour/events{/privacy}",
|
||||
"received_events_url": "https://api.github.com/users/machour/received_events",
|
||||
"type": "User",
|
||||
"site_admin": false,
|
||||
"contributions": 6
|
||||
},
|
||||
{
|
||||
"login": "chrisinajar",
|
||||
"id": 422331,
|
||||
"avatar_url": "https://avatars1.githubusercontent.com/u/422331?v=4",
|
||||
"gravatar_id": "",
|
||||
"url": "https://api.github.com/users/chrisinajar",
|
||||
"html_url": "https://github.com/chrisinajar",
|
||||
"followers_url": "https://api.github.com/users/chrisinajar/followers",
|
||||
"following_url": "https://api.github.com/users/chrisinajar/following{/other_user}",
|
||||
"gists_url": "https://api.github.com/users/chrisinajar/gists{/gist_id}",
|
||||
"starred_url": "https://api.github.com/users/chrisinajar/starred{/owner}{/repo}",
|
||||
"subscriptions_url": "https://api.github.com/users/chrisinajar/subscriptions",
|
||||
"organizations_url": "https://api.github.com/users/chrisinajar/orgs",
|
||||
"repos_url": "https://api.github.com/users/chrisinajar/repos",
|
||||
"events_url": "https://api.github.com/users/chrisinajar/events{/privacy}",
|
||||
"received_events_url": "https://api.github.com/users/chrisinajar/received_events",
|
||||
"type": "User",
|
||||
"site_admin": false,
|
||||
"contributions": 4
|
||||
},
|
||||
{
|
||||
"login": "alexjoverm",
|
||||
"id": 5701162,
|
||||
"avatar_url": "https://avatars3.githubusercontent.com/u/5701162?v=4",
|
||||
"gravatar_id": "",
|
||||
"url": "https://api.github.com/users/alexjoverm",
|
||||
"html_url": "https://github.com/alexjoverm",
|
||||
"followers_url": "https://api.github.com/users/alexjoverm/followers",
|
||||
"following_url": "https://api.github.com/users/alexjoverm/following{/other_user}",
|
||||
"gists_url": "https://api.github.com/users/alexjoverm/gists{/gist_id}",
|
||||
"starred_url": "https://api.github.com/users/alexjoverm/starred{/owner}{/repo}",
|
||||
"subscriptions_url": "https://api.github.com/users/alexjoverm/subscriptions",
|
||||
"organizations_url": "https://api.github.com/users/alexjoverm/orgs",
|
||||
"repos_url": "https://api.github.com/users/alexjoverm/repos",
|
||||
"events_url": "https://api.github.com/users/alexjoverm/events{/privacy}",
|
||||
"received_events_url": "https://api.github.com/users/alexjoverm/received_events",
|
||||
"type": "User",
|
||||
"site_admin": false,
|
||||
"contributions": 3
|
||||
},
|
||||
{
|
||||
"login": "ben-eb",
|
||||
"id": 1282980,
|
||||
"avatar_url": "https://avatars1.githubusercontent.com/u/1282980?v=4",
|
||||
"gravatar_id": "",
|
||||
"url": "https://api.github.com/users/ben-eb",
|
||||
"html_url": "https://github.com/ben-eb",
|
||||
"followers_url": "https://api.github.com/users/ben-eb/followers",
|
||||
"following_url": "https://api.github.com/users/ben-eb/following{/other_user}",
|
||||
"gists_url": "https://api.github.com/users/ben-eb/gists{/gist_id}",
|
||||
"starred_url": "https://api.github.com/users/ben-eb/starred{/owner}{/repo}",
|
||||
"subscriptions_url": "https://api.github.com/users/ben-eb/subscriptions",
|
||||
"organizations_url": "https://api.github.com/users/ben-eb/orgs",
|
||||
"repos_url": "https://api.github.com/users/ben-eb/repos",
|
||||
"events_url": "https://api.github.com/users/ben-eb/events{/privacy}",
|
||||
"received_events_url": "https://api.github.com/users/ben-eb/received_events",
|
||||
"type": "User",
|
||||
"site_admin": false,
|
||||
"contributions": 3
|
||||
},
|
||||
{
|
||||
"login": "kentcdodds",
|
||||
"id": 1500684,
|
||||
"avatar_url": "https://avatars0.githubusercontent.com/u/1500684?v=4",
|
||||
"gravatar_id": "",
|
||||
"url": "https://api.github.com/users/kentcdodds",
|
||||
"html_url": "https://github.com/kentcdodds",
|
||||
"followers_url": "https://api.github.com/users/kentcdodds/followers",
|
||||
"following_url": "https://api.github.com/users/kentcdodds/following{/other_user}",
|
||||
"gists_url": "https://api.github.com/users/kentcdodds/gists{/gist_id}",
|
||||
"starred_url": "https://api.github.com/users/kentcdodds/starred{/owner}{/repo}",
|
||||
"subscriptions_url": "https://api.github.com/users/kentcdodds/subscriptions",
|
||||
"organizations_url": "https://api.github.com/users/kentcdodds/orgs",
|
||||
"repos_url": "https://api.github.com/users/kentcdodds/repos",
|
||||
"events_url": "https://api.github.com/users/kentcdodds/events{/privacy}",
|
||||
"received_events_url": "https://api.github.com/users/kentcdodds/received_events",
|
||||
"type": "User",
|
||||
"site_admin": false,
|
||||
"contributions": 3
|
||||
},
|
||||
{
|
||||
"login": "itaisteinherz",
|
||||
"id": 22768990,
|
||||
"avatar_url": "https://avatars3.githubusercontent.com/u/22768990?v=4",
|
||||
"gravatar_id": "",
|
||||
"url": "https://api.github.com/users/itaisteinherz",
|
||||
"html_url": "https://github.com/itaisteinherz",
|
||||
"followers_url": "https://api.github.com/users/itaisteinherz/followers",
|
||||
"following_url": "https://api.github.com/users/itaisteinherz/following{/other_user}",
|
||||
"gists_url": "https://api.github.com/users/itaisteinherz/gists{/gist_id}",
|
||||
"starred_url": "https://api.github.com/users/itaisteinherz/starred{/owner}{/repo}",
|
||||
"subscriptions_url": "https://api.github.com/users/itaisteinherz/subscriptions",
|
||||
"organizations_url": "https://api.github.com/users/itaisteinherz/orgs",
|
||||
"repos_url": "https://api.github.com/users/itaisteinherz/repos",
|
||||
"events_url": "https://api.github.com/users/itaisteinherz/events{/privacy}",
|
||||
"received_events_url": "https://api.github.com/users/itaisteinherz/received_events",
|
||||
"type": "User",
|
||||
"site_admin": false,
|
||||
"contributions": 2
|
||||
},
|
||||
{
|
||||
"login": "brycereynolds",
|
||||
"id": 1026002,
|
||||
"avatar_url": "https://avatars2.githubusercontent.com/u/1026002?v=4",
|
||||
"gravatar_id": "",
|
||||
"url": "https://api.github.com/users/brycereynolds",
|
||||
"html_url": "https://github.com/brycereynolds",
|
||||
"followers_url": "https://api.github.com/users/brycereynolds/followers",
|
||||
"following_url": "https://api.github.com/users/brycereynolds/following{/other_user}",
|
||||
"gists_url": "https://api.github.com/users/brycereynolds/gists{/gist_id}",
|
||||
"starred_url": "https://api.github.com/users/brycereynolds/starred{/owner}{/repo}",
|
||||
"subscriptions_url": "https://api.github.com/users/brycereynolds/subscriptions",
|
||||
"organizations_url": "https://api.github.com/users/brycereynolds/orgs",
|
||||
"repos_url": "https://api.github.com/users/brycereynolds/repos",
|
||||
"events_url": "https://api.github.com/users/brycereynolds/events{/privacy}",
|
||||
"received_events_url": "https://api.github.com/users/brycereynolds/received_events",
|
||||
"type": "User",
|
||||
"site_admin": false,
|
||||
"contributions": 1
|
||||
},
|
||||
{
|
||||
"login": "jmeas",
|
||||
"id": 2322305,
|
||||
"avatar_url": "https://avatars3.githubusercontent.com/u/2322305?v=4",
|
||||
"gravatar_id": "",
|
||||
"url": "https://api.github.com/users/jmeas",
|
||||
"html_url": "https://github.com/jmeas",
|
||||
"followers_url": "https://api.github.com/users/jmeas/followers",
|
||||
"following_url": "https://api.github.com/users/jmeas/following{/other_user}",
|
||||
"gists_url": "https://api.github.com/users/jmeas/gists{/gist_id}",
|
||||
"starred_url": "https://api.github.com/users/jmeas/starred{/owner}{/repo}",
|
||||
"subscriptions_url": "https://api.github.com/users/jmeas/subscriptions",
|
||||
"organizations_url": "https://api.github.com/users/jmeas/orgs",
|
||||
"repos_url": "https://api.github.com/users/jmeas/repos",
|
||||
"events_url": "https://api.github.com/users/jmeas/events{/privacy}",
|
||||
"received_events_url": "https://api.github.com/users/jmeas/received_events",
|
||||
"type": "User",
|
||||
"site_admin": false,
|
||||
"contributions": 1
|
||||
},
|
||||
{
|
||||
"login": "jerodsanto",
|
||||
"id": 8212,
|
||||
"avatar_url": "https://avatars0.githubusercontent.com/u/8212?v=4",
|
||||
"gravatar_id": "",
|
||||
"url": "https://api.github.com/users/jerodsanto",
|
||||
"html_url": "https://github.com/jerodsanto",
|
||||
"followers_url": "https://api.github.com/users/jerodsanto/followers",
|
||||
"following_url": "https://api.github.com/users/jerodsanto/following{/other_user}",
|
||||
"gists_url": "https://api.github.com/users/jerodsanto/gists{/gist_id}",
|
||||
"starred_url": "https://api.github.com/users/jerodsanto/starred{/owner}{/repo}",
|
||||
"subscriptions_url": "https://api.github.com/users/jerodsanto/subscriptions",
|
||||
"organizations_url": "https://api.github.com/users/jerodsanto/orgs",
|
||||
"repos_url": "https://api.github.com/users/jerodsanto/repos",
|
||||
"events_url": "https://api.github.com/users/jerodsanto/events{/privacy}",
|
||||
"received_events_url": "https://api.github.com/users/jerodsanto/received_events",
|
||||
"type": "User",
|
||||
"site_admin": false,
|
||||
"contributions": 1
|
||||
},
|
||||
{
|
||||
"login": "jccguimaraes",
|
||||
"id": 14871650,
|
||||
"avatar_url": "https://avatars3.githubusercontent.com/u/14871650?v=4",
|
||||
"gravatar_id": "",
|
||||
"url": "https://api.github.com/users/jccguimaraes",
|
||||
"html_url": "https://github.com/jccguimaraes",
|
||||
"followers_url": "https://api.github.com/users/jccguimaraes/followers",
|
||||
"following_url": "https://api.github.com/users/jccguimaraes/following{/other_user}",
|
||||
"gists_url": "https://api.github.com/users/jccguimaraes/gists{/gist_id}",
|
||||
"starred_url": "https://api.github.com/users/jccguimaraes/starred{/owner}{/repo}",
|
||||
"subscriptions_url": "https://api.github.com/users/jccguimaraes/subscriptions",
|
||||
"organizations_url": "https://api.github.com/users/jccguimaraes/orgs",
|
||||
"repos_url": "https://api.github.com/users/jccguimaraes/repos",
|
||||
"events_url": "https://api.github.com/users/jccguimaraes/events{/privacy}",
|
||||
"received_events_url": "https://api.github.com/users/jccguimaraes/received_events",
|
||||
"type": "User",
|
||||
"site_admin": false,
|
||||
"contributions": 1
|
||||
},
|
||||
{
|
||||
"login": "kevinjalbert",
|
||||
"id": 574871,
|
||||
"avatar_url": "https://avatars3.githubusercontent.com/u/574871?v=4",
|
||||
"gravatar_id": "",
|
||||
"url": "https://api.github.com/users/kevinjalbert",
|
||||
"html_url": "https://github.com/kevinjalbert",
|
||||
"followers_url": "https://api.github.com/users/kevinjalbert/followers",
|
||||
"following_url": "https://api.github.com/users/kevinjalbert/following{/other_user}",
|
||||
"gists_url": "https://api.github.com/users/kevinjalbert/gists{/gist_id}",
|
||||
"starred_url": "https://api.github.com/users/kevinjalbert/starred{/owner}{/repo}",
|
||||
"subscriptions_url": "https://api.github.com/users/kevinjalbert/subscriptions",
|
||||
"organizations_url": "https://api.github.com/users/kevinjalbert/orgs",
|
||||
"repos_url": "https://api.github.com/users/kevinjalbert/repos",
|
||||
"events_url": "https://api.github.com/users/kevinjalbert/events{/privacy}",
|
||||
"received_events_url": "https://api.github.com/users/kevinjalbert/received_events",
|
||||
"type": "User",
|
||||
"site_admin": false,
|
||||
"contributions": 1
|
||||
},
|
||||
{
|
||||
"login": "revelt",
|
||||
"id": 8344688,
|
||||
"avatar_url": "https://avatars1.githubusercontent.com/u/8344688?v=4",
|
||||
"gravatar_id": "",
|
||||
"url": "https://api.github.com/users/revelt",
|
||||
"html_url": "https://github.com/revelt",
|
||||
"followers_url": "https://api.github.com/users/revelt/followers",
|
||||
"following_url": "https://api.github.com/users/revelt/following{/other_user}",
|
||||
"gists_url": "https://api.github.com/users/revelt/gists{/gist_id}",
|
||||
"starred_url": "https://api.github.com/users/revelt/starred{/owner}{/repo}",
|
||||
"subscriptions_url": "https://api.github.com/users/revelt/subscriptions",
|
||||
"organizations_url": "https://api.github.com/users/revelt/orgs",
|
||||
"repos_url": "https://api.github.com/users/revelt/repos",
|
||||
"events_url": "https://api.github.com/users/revelt/events{/privacy}",
|
||||
"received_events_url": "https://api.github.com/users/revelt/received_events",
|
||||
"type": "User",
|
||||
"site_admin": false,
|
||||
"contributions": 1
|
||||
},
|
||||
{
|
||||
"login": "spirosikmd",
|
||||
"id": 1057324,
|
||||
"avatar_url": "https://avatars3.githubusercontent.com/u/1057324?v=4",
|
||||
"gravatar_id": "",
|
||||
"url": "https://api.github.com/users/spirosikmd",
|
||||
"html_url": "https://github.com/spirosikmd",
|
||||
"followers_url": "https://api.github.com/users/spirosikmd/followers",
|
||||
"following_url": "https://api.github.com/users/spirosikmd/following{/other_user}",
|
||||
"gists_url": "https://api.github.com/users/spirosikmd/gists{/gist_id}",
|
||||
"starred_url": "https://api.github.com/users/spirosikmd/starred{/owner}{/repo}",
|
||||
"subscriptions_url": "https://api.github.com/users/spirosikmd/subscriptions",
|
||||
"organizations_url": "https://api.github.com/users/spirosikmd/orgs",
|
||||
"repos_url": "https://api.github.com/users/spirosikmd/repos",
|
||||
"events_url": "https://api.github.com/users/spirosikmd/events{/privacy}",
|
||||
"received_events_url": "https://api.github.com/users/spirosikmd/received_events",
|
||||
"type": "User",
|
||||
"site_admin": false,
|
||||
"contributions": 1
|
||||
},
|
||||
{
|
||||
"login": "fadc80",
|
||||
"id": 12335761,
|
||||
"avatar_url": "https://avatars3.githubusercontent.com/u/12335761?v=4",
|
||||
"gravatar_id": "",
|
||||
"url": "https://api.github.com/users/fadc80",
|
||||
"html_url": "https://github.com/fadc80",
|
||||
"followers_url": "https://api.github.com/users/fadc80/followers",
|
||||
"following_url": "https://api.github.com/users/fadc80/following{/other_user}",
|
||||
"gists_url": "https://api.github.com/users/fadc80/gists{/gist_id}",
|
||||
"starred_url": "https://api.github.com/users/fadc80/starred{/owner}{/repo}",
|
||||
"subscriptions_url": "https://api.github.com/users/fadc80/subscriptions",
|
||||
"organizations_url": "https://api.github.com/users/fadc80/orgs",
|
||||
"repos_url": "https://api.github.com/users/fadc80/repos",
|
||||
"events_url": "https://api.github.com/users/fadc80/events{/privacy}",
|
||||
"received_events_url": "https://api.github.com/users/fadc80/received_events",
|
||||
"type": "User",
|
||||
"site_admin": false,
|
||||
"contributions": 1
|
||||
},
|
||||
{
|
||||
"login": "snipe",
|
||||
"id": 197404,
|
||||
"avatar_url": "https://avatars0.githubusercontent.com/u/197404?v=4",
|
||||
"gravatar_id": "",
|
||||
"url": "https://api.github.com/users/snipe",
|
||||
"html_url": "https://github.com/snipe",
|
||||
"followers_url": "https://api.github.com/users/snipe/followers",
|
||||
"following_url": "https://api.github.com/users/snipe/following{/other_user}",
|
||||
"gists_url": "https://api.github.com/users/snipe/gists{/gist_id}",
|
||||
"starred_url": "https://api.github.com/users/snipe/starred{/owner}{/repo}",
|
||||
"subscriptions_url": "https://api.github.com/users/snipe/subscriptions",
|
||||
"organizations_url": "https://api.github.com/users/snipe/orgs",
|
||||
"repos_url": "https://api.github.com/users/snipe/repos",
|
||||
"events_url": "https://api.github.com/users/snipe/events{/privacy}",
|
||||
"received_events_url": "https://api.github.com/users/snipe/received_events",
|
||||
"type": "User",
|
||||
"site_admin": false,
|
||||
"contributions": 1
|
||||
}
|
||||
]
|
18
lib/util/fixtures/all-contributors.transformed.json
Normal file
18
lib/util/fixtures/all-contributors.transformed.json
Normal file
|
@ -0,0 +1,18 @@
|
|||
[
|
||||
"jfmengels",
|
||||
"machour",
|
||||
"chrisinajar",
|
||||
"alexjoverm",
|
||||
"ben-eb",
|
||||
"kentcdodds",
|
||||
"itaisteinherz",
|
||||
"brycereynolds",
|
||||
"jmeas",
|
||||
"jerodsanto",
|
||||
"jccguimaraes",
|
||||
"kevinjalbert",
|
||||
"revelt",
|
||||
"spirosikmd",
|
||||
"fadc80",
|
||||
"snipe"
|
||||
]
|
2003
lib/util/fixtures/react-native.response.1.json
Normal file
2003
lib/util/fixtures/react-native.response.1.json
Normal file
File diff suppressed because it is too large
Load diff
2003
lib/util/fixtures/react-native.response.2.json
Normal file
2003
lib/util/fixtures/react-native.response.2.json
Normal file
File diff suppressed because it is too large
Load diff
2003
lib/util/fixtures/react-native.response.3.json
Normal file
2003
lib/util/fixtures/react-native.response.3.json
Normal file
File diff suppressed because it is too large
Load diff
1523
lib/util/fixtures/react-native.response.4.json
Normal file
1523
lib/util/fixtures/react-native.response.4.json
Normal file
File diff suppressed because it is too large
Load diff
378
lib/util/fixtures/react-native.transformed.json
Normal file
378
lib/util/fixtures/react-native.transformed.json
Normal file
|
@ -0,0 +1,378 @@
|
|||
[
|
||||
"javache",
|
||||
"mkonicek",
|
||||
"vjeux",
|
||||
"nicklockwood",
|
||||
"sahrens",
|
||||
"tadeuzagallo",
|
||||
"davidaurelio",
|
||||
"emilsjolander",
|
||||
"jeanlauliac",
|
||||
"frantic",
|
||||
"bestander",
|
||||
"amasad",
|
||||
"martinbigio",
|
||||
"ericvicenti",
|
||||
"ide",
|
||||
"janicduplessis",
|
||||
"shergin",
|
||||
"AaaChiuuu",
|
||||
"astreet",
|
||||
"brentvatne",
|
||||
"andreicoman11",
|
||||
"foghina",
|
||||
"cpojer",
|
||||
"hramos",
|
||||
"sophiebits",
|
||||
"korDen",
|
||||
"hedgerwang",
|
||||
"mhorowitz",
|
||||
"a2",
|
||||
"kmagiera",
|
||||
"ahmedre",
|
||||
"satya164",
|
||||
"yungsters",
|
||||
"lexs",
|
||||
"rigdern",
|
||||
"sunnylqm",
|
||||
"ayc1",
|
||||
"alexeylang",
|
||||
"philikon",
|
||||
"fkgozali",
|
||||
"gabelevi",
|
||||
"cjhopman",
|
||||
"grabbou",
|
||||
"majak",
|
||||
"bvaughn",
|
||||
"adamjernst",
|
||||
"woehrl01",
|
||||
"mikearmstrong001",
|
||||
"fromcelticpark",
|
||||
"cwdick",
|
||||
"michalgr",
|
||||
"amnn",
|
||||
"skevy",
|
||||
"JoelMarcey",
|
||||
"fred2028",
|
||||
"mmmulani",
|
||||
"sebmarkbage",
|
||||
"christopherdro",
|
||||
"MengjueW",
|
||||
"sjkirby",
|
||||
"lukaspiatkowski",
|
||||
"bnham",
|
||||
"zertosh",
|
||||
"skv-headless",
|
||||
"chirag04",
|
||||
"dlowder-salesforce",
|
||||
"mjesun",
|
||||
"rafeca",
|
||||
"rsnara",
|
||||
"lebronJ",
|
||||
"voideanvalue",
|
||||
"lacker",
|
||||
"corbt",
|
||||
"nathanajah",
|
||||
"leeight",
|
||||
"rh389",
|
||||
"zjj010104",
|
||||
"gaearon",
|
||||
"kassens",
|
||||
"jspahrsummers",
|
||||
"bhosmer",
|
||||
"jingc",
|
||||
"GantMan",
|
||||
"jeffmo",
|
||||
"mzlee",
|
||||
"andrewsardone",
|
||||
"TheSavior",
|
||||
"mroch",
|
||||
"Kureev",
|
||||
"caabernathy",
|
||||
"milend",
|
||||
"ryangomba",
|
||||
"arasmussen",
|
||||
"gre",
|
||||
"dsibiski",
|
||||
"jeanregisser",
|
||||
"JoeStanton",
|
||||
"qbig",
|
||||
"donyu",
|
||||
"aleclarson",
|
||||
"splhack",
|
||||
"johnislarry",
|
||||
"nihgwu",
|
||||
"charpeni",
|
||||
"doochik",
|
||||
"Bhullnatik",
|
||||
"Rudimental",
|
||||
"fkling",
|
||||
"ncuillery",
|
||||
"olegbl",
|
||||
"deminoth",
|
||||
"vonovak",
|
||||
"Kerumen",
|
||||
"terribleben",
|
||||
"cmcewen",
|
||||
"morenoh149",
|
||||
"tjwudi",
|
||||
"jsierles",
|
||||
"paramaggarwal",
|
||||
"zpao",
|
||||
"sam-swarr",
|
||||
"swolchok",
|
||||
"theoy",
|
||||
"AndrewJack",
|
||||
"rozele",
|
||||
"jhen0409",
|
||||
"mikelambert",
|
||||
"tomasreimers",
|
||||
"SandroMachado",
|
||||
"MattFoley",
|
||||
"andrewimm",
|
||||
"alloy",
|
||||
"sriramramani",
|
||||
"umhan35",
|
||||
"tdzl2003",
|
||||
"odino",
|
||||
"geirman",
|
||||
"mroswald",
|
||||
"jondot",
|
||||
"ajwhite",
|
||||
"dantman",
|
||||
"dabbott",
|
||||
"emilioicai",
|
||||
"nevir",
|
||||
"jacobp100",
|
||||
"jmurzy",
|
||||
"nmn",
|
||||
"neilsarkar",
|
||||
"ptomasroos",
|
||||
"Adlai-Holler",
|
||||
"calebmer",
|
||||
"danzimm",
|
||||
"tepamid",
|
||||
"kageurufu",
|
||||
"ndfred",
|
||||
"gsklee",
|
||||
"geof90",
|
||||
"devknoll",
|
||||
"k21",
|
||||
"josephsavona",
|
||||
"oblador",
|
||||
"joshuapinter",
|
||||
"Kudo",
|
||||
"lelandrichardson",
|
||||
"xixixao",
|
||||
"dabit3",
|
||||
"fmoo",
|
||||
"prathamesh-sonpatki",
|
||||
"radko93",
|
||||
"reneweb",
|
||||
"steveluscher",
|
||||
"sumkit",
|
||||
"Yu-w",
|
||||
"alvaromb",
|
||||
"dalinaum",
|
||||
"dikaiosune",
|
||||
"alexkrolick",
|
||||
"aljs",
|
||||
"Andreyco",
|
||||
"acdlite",
|
||||
"BretJohnson",
|
||||
"cbrevik",
|
||||
"dhrrgn",
|
||||
"danielbraun",
|
||||
"bluedaniel",
|
||||
"hartbit",
|
||||
"DmitrySoshnikov",
|
||||
"dshahidehpour",
|
||||
"esauter5",
|
||||
"gwmccull",
|
||||
"gusgard",
|
||||
"dinhviethoa",
|
||||
"dozoisch",
|
||||
"jasonprado",
|
||||
"jpshelley",
|
||||
"jkeljo",
|
||||
"JAStanton",
|
||||
"jberdine",
|
||||
"cooperka",
|
||||
"koenpunt",
|
||||
"kushal",
|
||||
"negativetwelve",
|
||||
"admmasters",
|
||||
"bolinfest",
|
||||
"nickhudkins",
|
||||
"Hypuk",
|
||||
"pcottle",
|
||||
"rreusser",
|
||||
"dulinriley",
|
||||
"oyvindkinsey",
|
||||
"scarlac",
|
||||
"sreesharp",
|
||||
"vishnevskiy",
|
||||
"subtleGradient",
|
||||
"TomMcHugh",
|
||||
"almost",
|
||||
"timwangdev",
|
||||
"tylermcginnis",
|
||||
"avaly",
|
||||
"fson",
|
||||
"bottledwalter",
|
||||
"Za1batsu",
|
||||
"rocman",
|
||||
"chenxsan",
|
||||
"tehfailsafe",
|
||||
"ywz2010",
|
||||
"wusuopu",
|
||||
"mkonicek-pr-test",
|
||||
"ptmt",
|
||||
"cxfeng1",
|
||||
"AbilashK",
|
||||
"adrianomelo",
|
||||
"nucleartux",
|
||||
"AgtLucas",
|
||||
"alonsch",
|
||||
"adbl",
|
||||
"andybb",
|
||||
"galenandrew",
|
||||
"angelahess",
|
||||
"arthuralee",
|
||||
"ashwinb",
|
||||
"buba447",
|
||||
"brunobar79",
|
||||
"cdlewis",
|
||||
"cosmith",
|
||||
"DaleJefferson",
|
||||
"damusnet",
|
||||
"kastiglione",
|
||||
"dgladkov",
|
||||
"dralletje",
|
||||
"Ehesp",
|
||||
"arv",
|
||||
"Fanghao",
|
||||
"fryn",
|
||||
"gabrielbull",
|
||||
"gabro",
|
||||
"hnryjms",
|
||||
"hswolff",
|
||||
"indragiek",
|
||||
"jaysoo",
|
||||
"jaggs6",
|
||||
"dejakob",
|
||||
"jamesisaac",
|
||||
"janmonschke",
|
||||
"browniefed",
|
||||
"notjosh",
|
||||
"kevinejohn",
|
||||
"l-urence",
|
||||
"leebyron",
|
||||
"cheeaun",
|
||||
"jetzhliu",
|
||||
"Minishlink",
|
||||
"lukemiles",
|
||||
"maartenschumacher",
|
||||
"manask88",
|
||||
"mjmahone",
|
||||
"arbesfeld",
|
||||
"matthewwithanm",
|
||||
"mjw56",
|
||||
"natansh",
|
||||
"nicktate",
|
||||
"niftylettuce",
|
||||
"nsimmons",
|
||||
"nikki93",
|
||||
"paulshen",
|
||||
"petterh",
|
||||
"Crash--",
|
||||
"rclai",
|
||||
"robertjpayne",
|
||||
"andersryanc",
|
||||
"ryanolsonk",
|
||||
"stevelacy",
|
||||
"jkdf2",
|
||||
"teameh",
|
||||
"gitim",
|
||||
"Intellicode",
|
||||
"tabrindle",
|
||||
"beefon",
|
||||
"sharnik",
|
||||
"rt2zz",
|
||||
"ahanriat",
|
||||
"cailenmusselman",
|
||||
"desmond1121",
|
||||
"lzyzsd",
|
||||
"jrodiger",
|
||||
"kentaromiura",
|
||||
"king6cong",
|
||||
"mkonicek-tester",
|
||||
"mlanter",
|
||||
"pedramsaleh",
|
||||
"realaboo",
|
||||
"zxcpoiu",
|
||||
"stereodenis",
|
||||
"ericnakagawa",
|
||||
"ASCE1885",
|
||||
"abi",
|
||||
"aroth",
|
||||
"aharons",
|
||||
"AlbertBrand",
|
||||
"alexleventer",
|
||||
"axelander",
|
||||
"alexanderjarvis",
|
||||
"burgalon",
|
||||
"anant90",
|
||||
"astuetz",
|
||||
"anishpCL",
|
||||
"anoopc",
|
||||
"antoinerousseau",
|
||||
"anttimo",
|
||||
"arjunkomath",
|
||||
"rawrmaan",
|
||||
"artemyarulin",
|
||||
"artyomtrityak",
|
||||
"hckuo",
|
||||
"avikchaudhuri",
|
||||
"isair",
|
||||
"bbodenmiller",
|
||||
"benvium",
|
||||
"benhoyt",
|
||||
"Benjamin-Dobell",
|
||||
"bradleyboy",
|
||||
"bradens",
|
||||
"appsforartists",
|
||||
"chentsulin",
|
||||
"ccheever",
|
||||
"chiraggshah",
|
||||
"cblappert",
|
||||
"cbpetersen",
|
||||
"ColCh",
|
||||
"colinramsay",
|
||||
"cornedor",
|
||||
"mdamien",
|
||||
"dingbat",
|
||||
"danscan",
|
||||
"kodafb",
|
||||
"DanielMSchmidt",
|
||||
"LearningDave",
|
||||
"dvcrn",
|
||||
"deanmcpherson",
|
||||
"trueadm",
|
||||
"DougBanksPersonal",
|
||||
"drewvolz",
|
||||
"Emilios1995",
|
||||
"manosim",
|
||||
"j27cai",
|
||||
"erickreutz",
|
||||
"fabulant",
|
||||
"fadils",
|
||||
"KrauseFx",
|
||||
"puf",
|
||||
"greis",
|
||||
"genki",
|
||||
"ephemer",
|
||||
"hharnisc",
|
||||
"hawkrives",
|
||||
"kirkness"
|
||||
]
|
|
@ -4,5 +4,6 @@ module.exports = {
|
|||
configFile: require('./config-file'),
|
||||
contributionTypes: require('./contribution-types'),
|
||||
git: require('./git'),
|
||||
markdown: require('./markdown')
|
||||
markdown: require('./markdown'),
|
||||
check: require('./check')
|
||||
};
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
"homepage": "https://github.com/jfmengels/all-contributors-cli#readme",
|
||||
"dependencies": {
|
||||
"async": "^2.0.0-rc.1",
|
||||
"chalk": "^2.3.0",
|
||||
"inquirer": "^3.0.1",
|
||||
"lodash": "^4.11.2",
|
||||
"pify": "^2.3.0",
|
||||
|
@ -39,8 +40,8 @@
|
|||
"ava": "^0.14.0",
|
||||
"nock": "^8.0.0",
|
||||
"nyc": "^6.4.2",
|
||||
"xo": "^0.15.0",
|
||||
"semantic-release": "^6.3.2"
|
||||
"semantic-release": "^6.3.2",
|
||||
"xo": "^0.15.0"
|
||||
},
|
||||
"ava": {
|
||||
"files": [
|
||||
|
|
|
@ -1114,6 +1114,14 @@ chalk@^2.0.0:
|
|||
escape-string-regexp "^1.0.5"
|
||||
supports-color "^4.0.0"
|
||||
|
||||
chalk@^2.3.0:
|
||||
version "2.3.0"
|
||||
resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.3.0.tgz#b5ea48efc9c1793dccc9b4767c93914d3f2d52ba"
|
||||
dependencies:
|
||||
ansi-styles "^3.1.0"
|
||||
escape-string-regexp "^1.0.5"
|
||||
supports-color "^4.0.0"
|
||||
|
||||
chokidar@^1.4.2:
|
||||
version "1.7.0"
|
||||
resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-1.7.0.tgz#798e689778151c8076b4b360e5edd28cda2bb468"
|
||||
|
|
Loading…
Reference in a new issue