@@ -16,7 +16,12 @@ test.beforeEach((t) => {
16
16
// Mock logger
17
17
t . context . log = sinon . stub ( ) ;
18
18
t . context . error = sinon . stub ( ) ;
19
- t . context . logger = { log : t . context . log , error : t . context . error } ;
19
+ t . context . warn = sinon . stub ( ) ;
20
+ t . context . logger = {
21
+ log : t . context . log ,
22
+ error : t . context . error ,
23
+ warn : t . context . warn ,
24
+ } ;
20
25
} ) ;
21
26
22
27
test ( "Add comment and labels to PRs associated with release commits and issues solved by PR/commits comments" , async ( t ) => {
@@ -125,6 +130,8 @@ test("Add comment and labels to PRs associated with release commits and issues s
125
130
url : "label_url" ,
126
131
name : "label_name" ,
127
132
color : "ededed" ,
133
+ description : "this is a label description" ,
134
+ isDefault : false ,
128
135
} ,
129
136
] ,
130
137
} ,
@@ -159,6 +166,8 @@ test("Add comment and labels to PRs associated with release commits and issues s
159
166
url : "label_url" ,
160
167
name : "label_name" ,
161
168
color : "ededed" ,
169
+ description : "this is a label description" ,
170
+ isDefault : false ,
162
171
} ,
163
172
] ,
164
173
} ,
@@ -432,6 +441,8 @@ test("Add comment and labels to PRs associated with release commits and issues (
432
441
url : "label_url" ,
433
442
name : "label_name" ,
434
443
color : "ededed" ,
444
+ description : "this is a label description" ,
445
+ isDefault : false ,
435
446
} ,
436
447
] ,
437
448
} ,
@@ -466,6 +477,8 @@ test("Add comment and labels to PRs associated with release commits and issues (
466
477
url : "label_url" ,
467
478
name : "label_name" ,
468
479
color : "ededed" ,
480
+ description : "this is a label description" ,
481
+ isDefault : false ,
469
482
} ,
470
483
] ,
471
484
} ,
@@ -685,6 +698,8 @@ test("Add comment and labels to PRs associated with release commits and issues c
685
698
url : "label_url" ,
686
699
name : "label_name" ,
687
700
color : "ededed" ,
701
+ description : "this is a label description" ,
702
+ isDefault : false ,
688
703
} ,
689
704
] ,
690
705
} ,
@@ -719,6 +734,8 @@ test("Add comment and labels to PRs associated with release commits and issues c
719
734
url : "label_url" ,
720
735
name : "label_name" ,
721
736
color : "ededed" ,
737
+ description : "this is a label description" ,
738
+ isDefault : false ,
722
739
} ,
723
740
] ,
724
741
} ,
@@ -1578,6 +1595,8 @@ test("Do not add comment and labels to PR/issues from other repo", async (t) =>
1578
1595
url : "label_url" ,
1579
1596
name : "label_name" ,
1580
1597
color : "ededed" ,
1598
+ description : "this is a label description" ,
1599
+ isDefault : false ,
1581
1600
} ,
1582
1601
] ,
1583
1602
} ,
@@ -1758,6 +1777,8 @@ test("Ignore missing and forbidden issues/PRs", async (t) => {
1758
1777
url : "label_url" ,
1759
1778
name : "label_name" ,
1760
1779
color : "ededed" ,
1780
+ description : "this is a label description" ,
1781
+ isDefault : false ,
1761
1782
} ,
1762
1783
] ,
1763
1784
} ,
@@ -1792,6 +1813,8 @@ test("Ignore missing and forbidden issues/PRs", async (t) => {
1792
1813
url : "label_url" ,
1793
1814
name : "label_name" ,
1794
1815
color : "ededed" ,
1816
+ description : "this is a label description" ,
1817
+ isDefault : false ,
1795
1818
} ,
1796
1819
] ,
1797
1820
} ,
@@ -1826,6 +1849,8 @@ test("Ignore missing and forbidden issues/PRs", async (t) => {
1826
1849
url : "label_url" ,
1827
1850
name : "label_name" ,
1828
1851
color : "ededed" ,
1852
+ description : "this is a label description" ,
1853
+ isDefault : false ,
1829
1854
} ,
1830
1855
] ,
1831
1856
} ,
@@ -3478,7 +3503,7 @@ test('Add comment and label to found issues/associatedPR using the "successComme
3478
3503
failTitle,
3479
3504
// Issues with the label "semantic-release-relevant" will be commented and labeled
3480
3505
successCommentCondition :
3481
- "<% return issue.labels.includes( 'semantic-release-relevant'); %>" ,
3506
+ "<% return issue.labels?.some((label) => { return label.name === ( 'semantic-release-relevant'); } ); %>" ,
3482
3507
} ;
3483
3508
const options = {
3484
3509
repositoryUrl : `https://github.com/${ owner } /${ repo } .git` ,
@@ -3527,6 +3552,8 @@ test('Add comment and label to found issues/associatedPR using the "successComme
3527
3552
url : "https://github.com/babblebey/sr-github/labels/released" ,
3528
3553
name : "semantic-release-relevant" ,
3529
3554
color : "ededed" ,
3555
+ description : "This issue is relevant to semantic-release" ,
3556
+ isDefault : false ,
3530
3557
} ,
3531
3558
] ,
3532
3559
} ,
@@ -3575,6 +3602,8 @@ test('Add comment and label to found issues/associatedPR using the "successComme
3575
3602
url : "https://github.com/babblebey/sr-github/labels/released" ,
3576
3603
name : "released" ,
3577
3604
color : "ededed" ,
3605
+ description : "this is a label description" ,
3606
+ isDefault : false ,
3578
3607
} ,
3579
3608
] ,
3580
3609
} ,
@@ -3773,6 +3802,8 @@ test('Does not comment/label associatedPR and relatedIssues created by "Bots"',
3773
3802
url : "label_url" ,
3774
3803
name : "label_name" ,
3775
3804
color : "ededed" ,
3805
+ description : "this is a label description" ,
3806
+ isDefault : false ,
3776
3807
} ,
3777
3808
] ,
3778
3809
} ,
@@ -3819,6 +3850,8 @@ test('Does not comment/label associatedPR and relatedIssues created by "Bots"',
3819
3850
url : "label_url" ,
3820
3851
name : "label_name" ,
3821
3852
color : "ededed" ,
3853
+ description : "this is a label description" ,
3854
+ isDefault : false ,
3822
3855
} ,
3823
3856
] ,
3824
3857
} ,
@@ -3910,6 +3943,8 @@ test('Does not comment/label associatedPR and relatedIssues created by "Bots"',
3910
3943
url : "label_url" ,
3911
3944
name : "label_name" ,
3912
3945
color : "ededed" ,
3946
+ description : "this is a label description" ,
3947
+ isDefault : false ,
3913
3948
} ,
3914
3949
] ,
3915
3950
} ,
@@ -3944,6 +3979,8 @@ test('Does not comment/label associatedPR and relatedIssues created by "Bots"',
3944
3979
url : "label_url" ,
3945
3980
name : "label_name" ,
3946
3981
color : "ededed" ,
3982
+ description : "this is a label description" ,
3983
+ isDefault : false ,
3947
3984
} ,
3948
3985
] ,
3949
3986
} ,
@@ -4158,6 +4195,8 @@ test('Does not comment/label "associatedPR" when "successCommentCondition" disab
4158
4195
url : "label_url" ,
4159
4196
name : "label_name" ,
4160
4197
color : "ededed" ,
4198
+ description : "this is a label description" ,
4199
+ isDefault : false ,
4161
4200
} ,
4162
4201
] ,
4163
4202
} ,
0 commit comments