File tree 1 file changed +8
-1
lines changed
lib/node_modules/@stdlib/_tools/changelog/generate/lib
1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change 20
20
21
21
// MODULES //
22
22
23
+ var contains = require ( '@stdlib/assert/contains' ) ;
24
+ var isDigitString = require ( '@stdlib/assert/is-digit-string' ) ;
23
25
var filter = require ( '@stdlib/array/base/filter' ) ;
24
26
var map = require ( '@stdlib/utils/map' ) ;
25
27
var collectField = require ( './collect_field.js' ) ;
@@ -28,6 +30,11 @@ var sectionEnd = require( './section_end.js' );
28
30
var heading = require ( './heading.js' ) ;
29
31
30
32
33
+ // VARIABLES //
34
+
35
+ var VERBS = [ 'Closes' , 'Fixes' , 'Resolves' ] ;
36
+
37
+
31
38
// FUNCTIONS //
32
39
33
40
/**
@@ -38,7 +45,7 @@ var heading = require( './heading.js' );
38
45
* @returns {boolean } boolean indicating whether a mention references closing an issue
39
46
*/
40
47
function isClosingIssue ( mention ) {
41
- return mention . action === 'Closes' || mention . action === 'Fixes' || mention . action === 'Resolves' ;
48
+ return contains ( VERBS , mention . action ) && isDigitString ( mention . ref ) ;
42
49
}
43
50
44
51
/**
You can’t perform that action at this time.
0 commit comments