Skip to content

Commit

Permalink
tools: add verbose flag to inactive TSC finder
Browse files Browse the repository at this point in the history
Refs: nodejs/node#43897 (comment)

PR-URL: nodejs/node#43913
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Tierney Cyren <hello@bnb.im>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
  • Loading branch information
Trott authored and guangwong committed Oct 10, 2022
1 parent 16d12dd commit 491e092
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion tools/find-inactive-tsc.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,15 @@ import cp from 'node:child_process';
import fs from 'node:fs';
import path from 'node:path';
import readline from 'node:readline';
import { parseArgs } from 'node:util';

const SINCE = process.argv[2] || '3 months ago';
const args = parseArgs({
allowPositionals: true,
options: { verbose: { type: 'boolean', short: 'v' } }
});

const verbose = args.values.verbose;
const SINCE = args.positionals[0] || '3 months ago';

async function runGitCommand(cmd, options = {}) {
const childProcess = cp.spawn('/bin/sh', ['-c', cmd], {
Expand Down Expand Up @@ -271,3 +278,8 @@ if (inactive.length) {
fs.writeFileSync(new URL('../README.md', import.meta.url), newReadmeText);
}
}

if (verbose) {
console.log(attendance);
console.log(votingRecords);
}

0 comments on commit 491e092

Please sign in to comment.