Skip to content

Commit 08bd9f9

Browse files
committed
fix: remove extra single-quotes from release notes
1 parent 7d0157f commit 08bd9f9

File tree

2 files changed

+11
-9
lines changed

2 files changed

+11
-9
lines changed

git.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,10 @@ export default {
2121
"git",
2222
"log",
2323
...(since === ROOT ? [] : [`${since}..HEAD`]),
24-
"--pretty=format:'%s %h'",
24+
"--pretty=format:%s %h",
2525
"--abbrev-commit",
2626
"--perl-regexp",
27-
"--grep",
28-
grep,
27+
...["--grep", grep],
2928
]).then((commit) => {
3029
if (!commit) {
3130
return [];

github.ts

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,27 +20,27 @@ function generateNotes(
2020
let notes = `# Version ${version}\n\n`;
2121
if (major.length) {
2222
notes += `## Breaking Changes\n\n`;
23-
notes += `${listNotes(major)}\n`;
23+
notes += `${listNotes(major)}\n\n`;
2424
}
2525

2626
if (minor.length) {
2727
notes += `## Features\n\n`;
28-
notes += `${listNotes(minor)}\n`;
28+
notes += `${listNotes(minor)}\n\n`;
2929
}
3030

3131
if (patch.length) {
3232
notes += `## Bug Fixes\n\n`;
33-
notes += `${listNotes(patch)}\n`;
33+
notes += `${listNotes(patch)}\n\n`;
3434
}
3535

3636
if (docs.length) {
3737
notes += `## Documentation\n\n`;
38-
notes += `${listNotes(docs)}\n`;
38+
notes += `${listNotes(docs)}\n\n`;
3939
}
4040

4141
if (other.length) {
4242
notes += `## Other\n\n`;
43-
notes += `${listNotes(other)}\n`;
43+
notes += `${listNotes(other)}\n\n`;
4444
}
4545

4646
return notes;
@@ -56,6 +56,9 @@ export default {
5656
throw new Error("GITHUB_TOKEN environment variable is not set.");
5757
}
5858

59+
// Generate the release notes
60+
const body = generateNotes(nextVer, commits);
61+
5962
// Create a new release using the 'request' function
6063
const res = await request("POST /repos/{owner}/{repo}/releases", {
6164
headers: {
@@ -65,7 +68,7 @@ export default {
6568
repo,
6669
name: nextVer,
6770
tag_name: nextVer,
68-
body: generateNotes(nextVer, commits),
71+
body,
6972
});
7073

7174
return res.data.html_url;

0 commit comments

Comments
 (0)