(workbook, {v3PRs, s2PRs, racPRs, aiPRs, otherPRs, offPRs})
| 58 | } |
| 59 | |
| 60 | function buildReleaseNotesSheet(workbook, {v3PRs, s2PRs, racPRs, aiPRs, otherPRs, offPRs}) { |
| 61 | let sheet = workbook.addWorksheet('Release Notes'); |
| 62 | |
| 63 | sheet.columns = [{width: 25}, {width: 70}, {width: 50}, {width: 50}]; |
| 64 | sheet.getColumn(2).alignment = {wrapText: true, vertical: 'top'}; |
| 65 | sheet.getColumn(4).alignment = {wrapText: true, vertical: 'top'}; |
| 66 | |
| 67 | let groups = [ |
| 68 | ['RAC', racPRs], |
| 69 | ['S2', s2PRs], |
| 70 | ['AI', aiPRs], |
| 71 | ['V3', v3PRs], |
| 72 | ['Other', otherPRs], |
| 73 | ['Off PRs', offPRs] |
| 74 | ]; |
| 75 | |
| 76 | for (let [name, rows] of groups) { |
| 77 | if (!rows || rows.length === 0) { |
| 78 | continue; |
| 79 | } |
| 80 | |
| 81 | let headingRow = sheet.addRow([name]); |
| 82 | headingRow.getCell(1).font = {bold: true}; |
| 83 | |
| 84 | for (let row of rows) { |
| 85 | let sanitized = [ |
| 86 | sanitizeExcelString(row[0]), |
| 87 | sanitizeExcelString(row[1]), |
| 88 | null, |
| 89 | sanitizeExcelString(row[3]) |
| 90 | ]; |
| 91 | let added = sheet.addRow(sanitized); |
| 92 | let url = row[2]; |
| 93 | if (url) { |
| 94 | added.getCell(3).value = {text: url, hyperlink: url}; |
| 95 | added.getCell(3).font = {color: {argb: 'FF0563C1'}, underline: true}; |
| 96 | } |
| 97 | } |
| 98 | |
| 99 | sheet.addRow([]); |
| 100 | } |
| 101 | } |
| 102 | |
| 103 | function buildPassFailSheet(workbook, {v3PRs, s2PRs, racPRs, aiPRs, otherPRs, offPRs}) { |
| 104 | let sheet = workbook.addWorksheet('Pass-Fail'); |
no test coverage detected