Skip to content

Commit

Permalink
updated console logs
Browse files Browse the repository at this point in the history
  • Loading branch information
sethkfman committed Jul 1, 2024
1 parent 903c347 commit 1346f7b
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions scripts/generate-rc-commits.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -134,9 +134,10 @@ function assignChangeType(field) {

async function main() {
const args = process.argv.slice(2);
const fileTitle = 'commits.csv';

if (args.length !== 2) {
console.error('Usage: node script.js branchA branchB');
console.error('Usage: node generate-rc-commits.mjs branchA branchB');
process.exit(1);
}

Expand All @@ -146,10 +147,10 @@ async function main() {
const commitsByTeam = await filterCommitsByTeam(branchA, branchB);

if (Object.keys(commitsByTeam).length === 0) {
console.log('No unique commits found.');
console.log('No commits found.');
} else {
const csvContent = formatAsCSV(commitsByTeam);
fs.writeFileSync('commits.csv', csvContent.join('\n'));
fs.writeFileSync(fileTitle, csvContent.join('\n'));
console.log('CSV file "commits.csv" created successfully.');
}
}
Expand Down

0 comments on commit 1346f7b

Please sign in to comment.