Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tools: add verbose flag to inactive TSC finder #43913

Merged
merged 2 commits into from
Jul 22, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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);
}