MCPcopy Create free account
hub / github.com/adobe/react-spectrum / generateCSV

Function generateCSV

scripts/getCommitsForTesting.mjs:166–183  ·  view source on GitHub ↗
(startDate, endDate)

Source from the content-addressed store, hash-verified

164}
165
166export async function generateCSV(startDate, endDate) {
167 let {v3PRs, s2PRs, racPRs, aiPRs, otherPRs, offPRs, counts} = await generateData(
168 startDate,
169 endDate
170 );
171
172 function formatRows(rows) {
173 return rows
174 .map(([component, instructions, url, title]) =>
175 [escapeCSV(component), escapeCSV(instructions), url, escapeCSV(title)].join()
176 )
177 .join('\n');
178 }
179
180 let csv = `V3 \n${formatRows(v3PRs)}\n\nRainbow \n${formatRows(s2PRs)}\n\nRAC \n${formatRows(racPRs)}\n\nAI \n${formatRows(aiPRs)}\n\nOff PR \n${formatRows(offPRs)}\n\nOther \n${formatRows(otherPRs)}\n`;
181
182 return {csv, counts};
183}
184
185async function listOpenOffPRs() {
186 let allPRs = [];

Callers 1

writeTestingCSVFunction · 0.85

Calls 2

generateDataFunction · 0.85
formatRowsFunction · 0.85

Tested by

no test coverage detected