Skip to content

Commit cc97402

Browse files
committed
code cleanup
1 parent 529e27c commit cc97402

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/generate-changelog.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -196,8 +196,9 @@ function parseChangelogFromPrDescriptions(prDescriptions: string[]): Changelog {
196196
if (fixMatches) {
197197
const fixMatchesArray = [...fixMatches]
198198
for (const fixMatch of fixMatchesArray) {
199-
if (fixMatch[1].trim()) {
200-
changelog_fixed.push(fixMatch[1].trim())
199+
const fixMatchString = fixMatch[1].trim()
200+
if (fixMatchString) {
201+
changelog_fixed.push(fixMatchString)
201202
}
202203
}
203204
}
@@ -206,8 +207,9 @@ function parseChangelogFromPrDescriptions(prDescriptions: string[]): Changelog {
206207
if (addMatches) {
207208
const addMatchesArray = [...addMatches]
208209
for (const addMatch of addMatchesArray) {
209-
if (addMatch[1].trim()) {
210-
changelog_new.push(addMatch[1].trim())
210+
const addMatchString = addMatch[1].trim()
211+
if (addMatchString) {
212+
changelog_new.push(addMatchString)
211213
}
212214
}
213215
}

0 commit comments

Comments
 (0)