Skip to content

Commit

Permalink
fix(github-changelog-notes): prepend header to create parseable relea…
Browse files Browse the repository at this point in the history
…se notes
  • Loading branch information
chingor13 committed Apr 10, 2023
1 parent fe8454b commit 0b8fa4a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/changelog-notes/github.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,13 @@ export class GitHubChangelogNotes implements ChangelogNotes {
_commits: ConventionalCommit[],
options: BuildNotesOptions
): Promise<string> {
return await this.github.generateReleaseNotes(
const body = await this.github.generateReleaseNotes(
options.currentTag,
options.targetBranch,
options.previousTag
);
const date = (new Date()).toLocaleDateString('en-CA');
const header = `## ${options.version} (${date})`;
return `${header}\n\n${body}`;
}
}

0 comments on commit 0b8fa4a

Please sign in to comment.