Skip to content

Commit 5673581

Browse files
authored
ci: Drop Documentation from release notes (#446)
Signed-off-by: Vad1mo <vadim@8gears.com>
1 parent fb6a41b commit 5673581

2 files changed

Lines changed: 7 additions & 3 deletions

File tree

.github/scripts/format-release-notes.mjs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ const sectionNames = new Map([
2020
['Bug Fixes', 'Fixes'],
2121
['Performance Improvements', 'Updates'],
2222
['Code Refactoring', 'Updates'],
23-
['Documentation', 'Updates'],
2423
]);
24+
const droppedSections = new Set(['Documentation']);
2525
const sectionOrder = ['Commercial Features', 'Features', 'Fixes', 'Updates', 'Upstream', 'Reverts'];
2626
const sections = new Map(sectionOrder.map(section => [section, []]));
2727
const trailing = [];
@@ -193,12 +193,16 @@ for (const line of releaseNotesLines(releaseBody)) {
193193
if (line.startsWith('### ')) {
194194
sawSection = true;
195195
currentSection = sectionNames.get(line.slice(4)) ?? line.slice(4);
196-
if (!sections.has(currentSection)) {
196+
if (!droppedSections.has(currentSection) && !sections.has(currentSection)) {
197197
sections.set(currentSection, []);
198198
}
199199
continue;
200200
}
201201

202+
if (droppedSections.has(currentSection)) {
203+
continue;
204+
}
205+
202206
if (line.startsWith('* ') || line.startsWith('- ')) {
203207
let entry = formatEntry(line);
204208
const targetSection = entry.toLowerCase().includes('[upstream]') || currentSection === 'Upstream' ? 'Upstream' : currentSection;

release-please-config-maintenance.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
{"type": "upstream", "section": "Upstream"},
1414
{"type": "revert", "section": "Reverts"},
1515
{"type": "refactor", "section": "Code Refactoring"},
16-
{"type": "docs", "section": "Documentation", "hidden": true},
16+
{"type": "docs", "section": "Documentation"},
1717
{"type": "test", "section": "Tests", "hidden": true},
1818
{"type": "chore", "section": "Miscellaneous", "hidden": true},
1919
{"type": "ci", "section": "CI/CD", "hidden": true},

0 commit comments

Comments
 (0)