Skip to content

Commit 529e27c

Browse files
committed
trim first and then add
1 parent 34349cd commit 529e27c

File tree

3 files changed

+13
-5
lines changed

3 files changed

+13
-5
lines changed

dist/index.js

Lines changed: 6 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/generate-changelog.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -196,15 +196,19 @@ function parseChangelogFromPrDescriptions(prDescriptions: string[]): Changelog {
196196
if (fixMatches) {
197197
const fixMatchesArray = [...fixMatches]
198198
for (const fixMatch of fixMatchesArray) {
199-
changelog_fixed.push(fixMatch[1].trim())
199+
if (fixMatch[1].trim()) {
200+
changelog_fixed.push(fixMatch[1].trim())
201+
}
200202
}
201203
}
202204

203205
const addMatches = prDescription.matchAll(NEW_REGEX)
204206
if (addMatches) {
205207
const addMatchesArray = [...addMatches]
206208
for (const addMatch of addMatchesArray) {
207-
changelog_new.push(addMatch[1].trim())
209+
if (addMatch[1].trim()) {
210+
changelog_new.push(addMatch[1].trim())
211+
}
208212
}
209213
}
210214
}

0 commit comments

Comments
 (0)