Skip to content
This repository was archived by the owner on Mar 17, 2025. It is now read-only.

Commit cac6b9b

Browse files
committed
- attempt to fix issue with parsing titles
1 parent c343510 commit cac6b9b

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

scripts/generate-release-notes.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,15 @@ async function readChangesets(options = {}) {
150150
return changesets.filter(changeset => changeset.branch === branch);
151151
}
152152

153+
// Update the function that formats the changeset entries
154+
function formatChangesetEntry(changeset) {
155+
// Remove any single quotes that might be wrapping the title
156+
const title = changeset.title.replace(/^['"]|['"]$/g, '');
157+
158+
// Ensure we have the full title
159+
return `* **${title}** (#${changeset.pr}) - @${changeset.author}`;
160+
}
161+
153162
// Generate release notes in markdown format
154163
async function generateMarkdownReleaseNotes(changesets, repoUrl, token) {
155164
// Categorize changesets

scripts/utils/changesets.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,8 +146,9 @@ function parseChangesetContent(content) {
146146
const metadataLines = lines.filter(line => line.includes(':'));
147147
for (const line of metadataLines) {
148148
const [key, value] = line.split(':', 2).map(part => part.trim());
149-
if (key === 'title') changeset.title = value;
150-
else if (key === 'pr') changeset.pr = parseInt(value, 10) || null;
149+
if (key === 'title') {
150+
changeset.title = value.replace(/^['"]|['"]$/g, '');
151+
} else if (key === 'pr') changeset.pr = parseInt(value, 10) || null;
151152
else if (key === 'author') changeset.author = value;
152153
else if (key === 'type') changeset.type = value;
153154
else if (key === 'breaking') changeset.breaking = value === 'true';

0 commit comments

Comments
 (0)