Skip to content

Commit

Permalink
chore: escape quotation marks in commit messages
Browse files Browse the repository at this point in the history
  • Loading branch information
tido64 committed Jan 9, 2025
1 parent 39094de commit c54f804
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion scripts/internal/release-notes.mts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ function repositoryUrl() {
function main(lastRelease: string, nextRelease: string): void {
const args = [
"log",
`--pretty=format:{ "hash": "%H", "message": "%s" }`,
`--pretty=format:{ hash": "%H", "message": "%s" }`,
`${lastRelease}...${nextRelease}`,
];
const git = spawn("git", args, { stdio: ["ignore", "pipe", "inherit"] });
Expand All @@ -65,6 +65,8 @@ function main(lastRelease: string, nextRelease: string): void {
const output = Buffer.concat(buffers)
.toString()
.trim()
.replaceAll('"', '\\"')
.replaceAll(""", '"')
.replaceAll("\n", ",");
const commits = JSON.parse(output);
if (commits.length === 0) {
Expand Down

0 comments on commit c54f804

Please sign in to comment.