Skip to content

Instantly share code, notes, and snippets.

@mgechev
Created October 4, 2022 22:50
Show Gist options
  • Save mgechev/703dcaa9479ae30f26e74e380e04300e to your computer and use it in GitHub Desktop.
Save mgechev/703dcaa9479ae30f26e74e380e04300e to your computer and use it in GitHub Desktop.
const { readFileSync } = require('fs');
const { execSync } = require('child_process');
const lastVersion = '14.0.0';
const repos = [
'~/Projects/angular',
'~/Projects/components',
'~/Projects/angular-cli'
];
const contributorsCommand = `git log ${lastVersion}.. --format="%aN <%aE>" --reverse | perl -e 'my %dedupe; while (<STDIN>) { print unless $dedupe{$_}++}'`;
const all = new Set(repos.reduce((accum, repo) => {
return accum + execSync(`cd ${repo} && ${contributorsCommand}`).toString();
}, '').split('\n').filter(e => !!e));
console.log(all.size);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment