MCPcopy Index your code
hub / github.com/adobe/react-spectrum / writeTestingCSV

Function writeTestingCSV

scripts/getCommitsForTesting.mjs:27–44  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

25}
26
27async function writeTestingCSV() {
28 let args = parseArgs({allowPositionals: true});
29 if (args.positionals.length < 2) {
30 console.error('Expected at least two arguments');
31 process.exit(1);
32 }
33
34 let start = new Date(args.positionals[0]);
35 let end = new Date(args.positionals[1]);
36
37 if (isNaN(start.getTime()) || isNaN(end.getTime())) {
38 console.error('Please verify that your date is correctly formatted');
39 process.exit(1);
40 }
41
42 let {csv} = await generateCSV(args.positionals[0], args.positionals[1]);
43 fs.writeFileSync('output.csv', csv, 'utf-8');
44}
45
46export async function generateData(startDate, endDate) {
47 let [data, openOffPRs] = await Promise.all([listCommits(startDate, endDate), listOpenOffPRs()]);

Callers 1

Calls 2

generateCSVFunction · 0.85
parseArgsFunction · 0.70

Tested by

no test coverage detected