Skip to content

Commit aed2e06

Browse files
authored
chore: update release note generation formatting (mongodb#3738)
1 parent be11dc8 commit aed2e06

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

.github/pull_request_template.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ If you haven't already, it would greatly help the team review this work in a tim
1616
You can do that here: https://jira.mongodb.org/projects/NODE
1717
-->
1818

19-
#### Release Highlight
19+
### Release Highlight
2020

2121
<!-- RELEASE_HIGHLIGHT_START -->
2222

23-
## Fill in title or leave empty for no highlight
23+
### Fill in title or leave empty for no highlight
2424

2525
<!-- RELEASE_HIGHLIGHT_END -->
2626

.github/scripts/highlights.mjs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ async function getPullRequestContent(pull_number) {
5252
return '';
5353
}
5454

55-
const start = body.indexOf('## ', body.indexOf(startIndicator));
55+
const start = body.indexOf('### ', body.indexOf(startIndicator));
5656
const end = body.indexOf(endIndicator);
5757
const highlightSection = body.slice(start, end).trim();
5858

@@ -67,6 +67,9 @@ async function pullRequestHighlights(prs) {
6767
const content = await getPullRequestContent(pr);
6868
highlights.push(content);
6969
}
70+
if (!highlights.length) return '';
71+
72+
highlights.unshift('## Release Notes\n\n');
7073
return highlights.join('');
7174
}
7275

0 commit comments

Comments
 (0)