(startDate, endDate)
| 164 | } |
| 165 | |
| 166 | export 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 | |
| 185 | async function listOpenOffPRs() { |
| 186 | let allPRs = []; |
no test coverage detected