Skip to content

Commit 2508221

Browse files
committed
feat(ci): Clean up cherry-pick tags from generated changelog
1 parent 4a7f585 commit 2508221

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

.github/workflows/draft-release-notes-on-tag.yaml

+6-1
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,12 @@ jobs:
125125
}
126126
function cleanUpTitle(title) {
127127
// Remove tags between brackets
128-
return title.replace(/\[[^\]]+\]/g, '')
128+
title = title.replace(/\[[^\]]+\]/g, '')
129+
// Remove cherry-pick prefix
130+
if (title.startsWith('🍒 ') && title.includes(' - ')) {
131+
title = title.substring(title.indexOf(' - ') + 3)
132+
}
133+
return title
129134
}
130135
function format(pullRequest) {
131136
var line = `${decorate(pullRequest)}${cleanUpTitle(pullRequest.title)} (#${pullRequest.number} - @${pullRequest.user.login}`

0 commit comments

Comments
 (0)