const versionList = Object.keys(releaseNote) for (const key of versionList) { // Skip a version if none of its release notes are chosen for cherry-picking. const shouldInclude = cherryPick[key].some(Boolean) if (!shouldInclude) { continue }
// Include version title
doc.addSection({
properties: {},
children: [
new Paragraph({
children: [
new TextRun({
text: key,
bold: true,
size: 16,
}),
],
}),
],
})
// Loop through each release note in the current version.
for (let i = 0; i < releaseNote[key].length; i++) {
// Verify if that specific release note is selected or not
if (cherryPick[key][i]) {
// Add a bullet point before each release note.
doc.addSection({
properties: {},
children: [
new Paragraph({
children: [
new TextRun({
text: '•',
bold: true,
}),
new TextRun({
text: releaseNote[key][i],
}),
],
}),
],
})
}
}
Attempting to add a section, but encountering issues. Any suggestions?