Add dry option
This commit is contained in:
parent
ed42a69488
commit
6d1a320445
12
index.js
12
index.js
@ -37,6 +37,11 @@ const argv = yargs(hideBin(process.argv))
|
||||
alias: 'e',
|
||||
description: 'Include reviews for PRs merged before this date',
|
||||
})
|
||||
.option('dry', {
|
||||
alias: 'd',
|
||||
type: 'boolean',
|
||||
description: 'Only list contribution details without creating them',
|
||||
})
|
||||
.help()
|
||||
.version()
|
||||
.demandOption('start', 'Please provide a start date')
|
||||
@ -182,8 +187,11 @@ Promise.all([
|
||||
|
||||
generateContributionData(reviews, kredits.Contributor).then(
|
||||
(contributionData) => {
|
||||
console.log('contributions:');
|
||||
console.log(util.inspect(contributionData, { depth: 3, colors: true }));
|
||||
if (argv.dry) {
|
||||
console.log('contributions:');
|
||||
console.log(util.inspect(contributionData, { depth: 3, colors: true }));
|
||||
return;
|
||||
}
|
||||
}
|
||||
);
|
||||
});
|
||||
|
Reference in New Issue
Block a user