Skip to content

Commit bfa3c1a

Browse files
authored
Merge pull request #13 from warpdotdev/aloke/test_changelog
Strip out empty items from the changelog
2 parents 701bbb7 + 00ef842 commit bfa3c1a

File tree

3 files changed

+17
-5
lines changed

3 files changed

+17
-5
lines changed

dist/index.js

Lines changed: 8 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: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -196,15 +196,21 @@ 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+
const fixMatchString = fixMatch[1].trim()
200+
if (fixMatchString) {
201+
changelog_fixed.push(fixMatchString)
202+
}
200203
}
201204
}
202205

203206
const addMatches = prDescription.matchAll(NEW_REGEX)
204207
if (addMatches) {
205208
const addMatchesArray = [...addMatches]
206209
for (const addMatch of addMatchesArray) {
207-
changelog_new.push(addMatch[1].trim())
210+
const addMatchString = addMatch[1].trim()
211+
if (addMatchString) {
212+
changelog_new.push(addMatchString)
213+
}
208214
}
209215
}
210216
}

0 commit comments

Comments
 (0)