@@ -2,9 +2,15 @@ const retrieveLabelDirectory = require('../../utils/retrieve-label-directory');
22
33// Use labelKeys to retrieve current labelNames from directory
44const [
5- nonPrContribution
5+ nonPrContribution ,
6+ complexity0 ,
7+ er ,
8+ epic
69] = [
7- 'NEW-nonPrContribution'
10+ 'NEW-nonPrContribution' ,
11+ 'complexity0' ,
12+ 'er' ,
13+ 'epic'
814] . map ( retrieveLabelDirectory ) ;
915
1016// ==================================================
@@ -15,8 +21,9 @@ const [
1521 *
1622 * @param {{github: object, context: object} } actionsGithubScriptArgs - GitHub
1723 * objects from actions/github-script
18- * @returns {boolean } False if the issue does not have a linked PR, a "non-PR
19- * contribution" label, or an "Ignore..." label.
24+ * @returns {boolean } False if the issue does not have a linked PR, one of the following contribution labels: "non-PR
25+ * contribution", "Complexity: Prework", "ER", "epic", or an
26+ * "Ignore..." label.
2027 */
2128async function hasLinkedPrOrExcusableLabel ( { github, context } ) {
2229 const repoOwner = context . repo . owner ;
@@ -31,10 +38,12 @@ async function hasLinkedPrOrExcusableLabel({ github, context }) {
3138 // --------------------------------------------------
3239
3340 // Check if the issue has the labels that will avoid re-opening it.
41+ const excludedLabels = [ nonPrContribution , complexity0 , er , epic ] ;
42+
3443 if (
3544 labels . some (
3645 ( label ) =>
37- label === nonPrContribution || label . toLowerCase ( ) . includes ( 'ignore' )
46+ excludedLabels . includes ( label ) || label . toLowerCase ( ) . includes ( 'ignore' )
3847 )
3948 ) {
4049 console . info ( consoleMessageAllowClose ) ;
0 commit comments