Skip to content

Commit

Permalink
chore: update release note generation formatting (#3738)
Browse files Browse the repository at this point in the history
  • Loading branch information
dariakp committed Jun 21, 2023
1 parent be11dc8 commit aed2e06
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ If you haven't already, it would greatly help the team review this work in a tim
You can do that here: https://jira.mongodb.org/projects/NODE
-->

#### Release Highlight
### Release Highlight

<!-- RELEASE_HIGHLIGHT_START -->

## Fill in title or leave empty for no highlight
### Fill in title or leave empty for no highlight

<!-- RELEASE_HIGHLIGHT_END -->

Expand Down
5 changes: 4 additions & 1 deletion .github/scripts/highlights.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ async function getPullRequestContent(pull_number) {
return '';
}

const start = body.indexOf('## ', body.indexOf(startIndicator));
const start = body.indexOf('### ', body.indexOf(startIndicator));
const end = body.indexOf(endIndicator);
const highlightSection = body.slice(start, end).trim();

Expand All @@ -67,6 +67,9 @@ async function pullRequestHighlights(prs) {
const content = await getPullRequestContent(pr);
highlights.push(content);
}
if (!highlights.length) return '';

highlights.unshift('## Release Notes\n\n');
return highlights.join('');
}

Expand Down

0 comments on commit aed2e06

Please sign in to comment.