Created
November 2, 2017 11:31
-
-
Save machour/09bfcb12625063e8dfe43a1802fd16ff to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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