Skip to content

Instantly share code, notes, and snippets.

@machour
Created November 2, 2017 11:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save machour/09bfcb12625063e8dfe43a1802fd16ff to your computer and use it in GitHub Desktop.
Save machour/09bfcb12625063e8dfe43a1802fd16ff to your computer and use it in GitHub Desktop.
const fs = require('fs');
const fetch = require('node-fetch');
fetch('https://api.github.com/repos/gitpoint/git-point/contributors?per_page=100').then(response => {
response.json().then(json => {
const realContributors = json.map(el => el.login);
const knownContributors = JSON.parse(fs.readFileSync('.all-contributorsrc')).contributors.map(el => el.login);
const diff = realContributors.filter(el => knownContributors.indexOf(el) === -1);
process.stdout.write(`Contributors length from GH: ${realContributors.length}\n`);
process.stdout.write(`Contributors length from AC: ${knownContributors.length}\n`);
process.stdout.write(`Diff: ${diff}\n`);
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment