File tree Expand file tree Collapse file tree 1 file changed +14
-2
lines changed
Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,12 @@ import shell from 'shelljs'
66const FIXES_REGEX = / ^ C H A N G E L O G - F I X E S : ( .* ) / gm
77const NEW_REGEX = / ^ C H A N G E L O G - N E W : ( .* ) / gm
88
9+ // Template text for the changelog that should be ignored.
10+ const CHANGELOG_TEMPLATE_TEXT = [
11+ 'Insert a single changelog entry here' ,
12+ 'Insert ANOTHER changelog entry here'
13+ ]
14+
915export interface Changelog {
1016 added : string [ ] | undefined
1117 fixed : string [ ] | undefined
@@ -197,7 +203,10 @@ function parseChangelogFromPrDescriptions(prDescriptions: string[]): Changelog {
197203 const fixMatchesArray = [ ...fixMatches ]
198204 for ( const fixMatch of fixMatchesArray ) {
199205 const fixMatchString = fixMatch [ 1 ] . trim ( )
200- if ( fixMatchString ) {
206+ if (
207+ fixMatchString &&
208+ ! CHANGELOG_TEMPLATE_TEXT . includes ( fixMatchString )
209+ ) {
201210 changelog_fixed . push ( fixMatchString )
202211 }
203212 }
@@ -208,7 +217,10 @@ function parseChangelogFromPrDescriptions(prDescriptions: string[]): Changelog {
208217 const addMatchesArray = [ ...addMatches ]
209218 for ( const addMatch of addMatchesArray ) {
210219 const addMatchString = addMatch [ 1 ] . trim ( )
211- if ( addMatchString ) {
220+ if (
221+ addMatchString &&
222+ ! CHANGELOG_TEMPLATE_TEXT . includes ( addMatchString )
223+ ) {
212224 changelog_new . push ( addMatchString )
213225 }
214226 }
You can’t perform that action at this time.
0 commit comments