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

Function buildReleaseNotesSheet

scripts/createExcelSheet.mjs:60–100  ·  view source on GitHub ↗
(workbook, {v3PRs, s2PRs, racPRs, otherPRs, offPRs})

Source from the content-addressed store, hash-verified

58}
59
60function buildReleaseNotesSheet(workbook, {v3PRs, s2PRs, racPRs, 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 ['V3', v3PRs],
71 ['Other', otherPRs],
72 ['Off PRs', offPRs]
73 ];
74
75 for (let [name, rows] of groups) {
76 if (!rows || rows.length === 0) {
77 continue;
78 }
79
80 let headingRow = sheet.addRow([name]);
81 headingRow.getCell(1).font = {bold: true};
82
83 for (let row of rows) {
84 let sanitized = [
85 sanitizeExcelString(row[0]),
86 sanitizeExcelString(row[1]),
87 null,
88 sanitizeExcelString(row[3])
89 ];
90 let added = sheet.addRow(sanitized);
91 let url = row[2];
92 if (url) {
93 added.getCell(3).value = {text: url, hyperlink: url};
94 added.getCell(3).font = {color: {argb: 'FF0563C1'}, underline: true};
95 }
96 }
97
98 sheet.addRow([]);
99 }
100}
101
102function buildPassFailSheet(workbook, {v3PRs, s2PRs, racPRs, otherPRs, offPRs}) {
103 let sheet = workbook.addWorksheet('Pass-Fail');

Callers 1

createTestingSheetFunction · 0.85

Calls 1

sanitizeExcelStringFunction · 0.85

Tested by

no test coverage detected