Skip to content

Commit 17a4e5e

Browse files
Trottdanielleadams
authored andcommitted
tools: add verbose flag to inactive TSC finder
Refs: #43897 (comment) PR-URL: #43913 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Darshan Sen <[email protected]> Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: Tierney Cyren <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Myles Borins <[email protected]>
1 parent ca658c8 commit 17a4e5e

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

tools/find-inactive-tsc.mjs

+13-1
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,15 @@ import cp from 'node:child_process';
1212
import fs from 'node:fs';
1313
import path from 'node:path';
1414
import readline from 'node:readline';
15+
import { parseArgs } from 'node:util';
1516

16-
const SINCE = process.argv[2] || '3 months ago';
17+
const args = parseArgs({
18+
allowPositionals: true,
19+
options: { verbose: { type: 'boolean', short: 'v' } }
20+
});
21+
22+
const verbose = args.values.verbose;
23+
const SINCE = args.positionals[0] || '3 months ago';
1724

1825
async function runGitCommand(cmd, options = {}) {
1926
const childProcess = cp.spawn('/bin/sh', ['-c', cmd], {
@@ -271,3 +278,8 @@ if (inactive.length) {
271278
fs.writeFileSync(new URL('../README.md', import.meta.url), newReadmeText);
272279
}
273280
}
281+
282+
if (verbose) {
283+
console.log(attendance);
284+
console.log(votingRecords);
285+
}

0 commit comments

Comments
 (0)