@@ -67,23 +67,23 @@ test.serial(
67
67
. reply ( 200 , [ { sha : commits [ 1 ] . hash } ] )
68
68
. post ( `/repos/${ redirectedOwner } /${ redirectedRepo } /issues/1/comments` , { body : / T h i s P R i s i n c l u d e d / } )
69
69
. reply ( 200 , { html_url : 'https://github.com/successcomment-1' } )
70
- . post ( `/repos/${ redirectedOwner } /${ redirectedRepo } /issues/1/labels` , '{"labels": ["released"]} ' )
70
+ . post ( `/repos/${ redirectedOwner } /${ redirectedRepo } /issues/1/labels` , '["released"]' )
71
71
. reply ( 200 , { } )
72
72
. post ( `/repos/${ redirectedOwner } /${ redirectedRepo } /issues/2/comments` , { body : / T h i s P R i s i n c l u d e d / } )
73
73
. reply ( 200 , { html_url : 'https://github.com/successcomment-2' } )
74
- . post ( `/repos/${ redirectedOwner } /${ redirectedRepo } /issues/2/labels` , '{"labels": ["released"]} ' )
74
+ . post ( `/repos/${ redirectedOwner } /${ redirectedRepo } /issues/2/labels` , '["released"]' )
75
75
. reply ( 200 , { } )
76
76
. get ( `/repos/${ redirectedOwner } /${ redirectedRepo } /issues/3` )
77
77
. reply ( 200 , { state : 'closed' } )
78
78
. post ( `/repos/${ redirectedOwner } /${ redirectedRepo } /issues/3/comments` , { body : / T h i s i s s u e h a s b e e n r e s o l v e d / } )
79
79
. reply ( 200 , { html_url : 'https://github.com/successcomment-3' } )
80
- . post ( `/repos/${ redirectedOwner } /${ redirectedRepo } /issues/3/labels` , '{"labels": ["released"]} ' )
80
+ . post ( `/repos/${ redirectedOwner } /${ redirectedRepo } /issues/3/labels` , '["released"]' )
81
81
. reply ( 200 , { } )
82
82
. get ( `/repos/${ redirectedOwner } /${ redirectedRepo } /issues/4` )
83
83
. reply ( 200 , { state : 'closed' } )
84
84
. post ( `/repos/${ redirectedOwner } /${ redirectedRepo } /issues/4/comments` , { body : / T h i s i s s u e h a s b e e n r e s o l v e d / } )
85
85
. reply ( 200 , { html_url : 'https://github.com/successcomment-4' } )
86
- . post ( `/repos/${ redirectedOwner } /${ redirectedRepo } /issues/4/labels` , '{"labels": ["released"]} ' )
86
+ . post ( `/repos/${ redirectedOwner } /${ redirectedRepo } /issues/4/labels` , '["released"]' )
87
87
. reply ( 200 , { } )
88
88
. get (
89
89
`/search/issues?q=${ escape ( 'in:title' ) } +${ escape ( `repo:${ redirectedOwner } /${ redirectedRepo } ` ) } +${ escape (
@@ -141,23 +141,23 @@ test.serial(
141
141
. reply ( 200 , [ { sha : commits [ 1 ] . hash } ] )
142
142
. post ( `/repos/${ owner } /${ repo } /issues/1/comments` , { body : / T h i s P R i s i n c l u d e d / } )
143
143
. reply ( 200 , { html_url : 'https://custom-url.com/successcomment-1' } )
144
- . post ( `/repos/${ owner } /${ repo } /issues/1/labels` , '{"labels": ["released on @next"]} ' )
144
+ . post ( `/repos/${ owner } /${ repo } /issues/1/labels` , '["released on @next"]' )
145
145
. reply ( 200 , { } )
146
146
. post ( `/repos/${ owner } /${ repo } /issues/2/comments` , { body : / T h i s P R i s i n c l u d e d / } )
147
147
. reply ( 200 , { html_url : 'https://custom-url.com/successcomment-2' } )
148
- . post ( `/repos/${ owner } /${ repo } /issues/2/labels` , '{"labels": ["released on @next"]} ' )
148
+ . post ( `/repos/${ owner } /${ repo } /issues/2/labels` , '["released on @next"]' )
149
149
. reply ( 200 , { } )
150
150
. get ( `/repos/${ owner } /${ repo } /issues/3` )
151
151
. reply ( 200 , { state : 'closed' } )
152
152
. post ( `/repos/${ owner } /${ repo } /issues/3/comments` , { body : / T h i s i s s u e h a s b e e n r e s o l v e d / } )
153
153
. reply ( 200 , { html_url : 'https://custom-url.com/successcomment-3' } )
154
- . post ( `/repos/${ owner } /${ repo } /issues/3/labels` , '{"labels": ["released on @next"]} ' )
154
+ . post ( `/repos/${ owner } /${ repo } /issues/3/labels` , '["released on @next"]' )
155
155
. reply ( 200 , { } )
156
156
. get ( `/repos/${ owner } /${ repo } /issues/4` )
157
157
. reply ( 200 , { state : 'closed' } )
158
158
. post ( `/repos/${ owner } /${ repo } /issues/4/comments` , { body : / T h i s i s s u e h a s b e e n r e s o l v e d / } )
159
159
. reply ( 200 , { html_url : 'https://custom-url.com/successcomment-4' } )
160
- . post ( `/repos/${ owner } /${ repo } /issues/4/labels` , '{"labels": ["released on @next"]} ' )
160
+ . post ( `/repos/${ owner } /${ repo } /issues/4/labels` , '["released on @next"]' )
161
161
. reply ( 200 , { } )
162
162
. get (
163
163
`/search/issues?q=${ escape ( 'in:title' ) } +${ escape ( `repo:${ owner } /${ repo } ` ) } +${ escape ( 'type:issue' ) } +${ escape (
@@ -235,27 +235,27 @@ test.serial('Make multiple search queries if necessary', async t => {
235
235
. reply ( 200 , [ { sha : commits [ 5 ] . hash } ] )
236
236
. post ( `/repos/${ owner } /${ repo } /issues/1/comments` , { body : / T h i s P R i s i n c l u d e d / } )
237
237
. reply ( 200 , { html_url : 'https://github.com/successcomment-1' } )
238
- . post ( `/repos/${ owner } /${ repo } /issues/1/labels` , '{"labels": ["released"]} ' )
238
+ . post ( `/repos/${ owner } /${ repo } /issues/1/labels` , '["released"]' )
239
239
. reply ( 200 , { } )
240
240
. post ( `/repos/${ owner } /${ repo } /issues/2/comments` , { body : / T h i s P R i s i n c l u d e d / } )
241
241
. reply ( 200 , { html_url : 'https://github.com/successcomment-2' } )
242
- . post ( `/repos/${ owner } /${ repo } /issues/2/labels` , '{"labels": ["released"]} ' )
242
+ . post ( `/repos/${ owner } /${ repo } /issues/2/labels` , '["released"]' )
243
243
. reply ( 200 , { } )
244
244
. post ( `/repos/${ owner } /${ repo } /issues/3/comments` , { body : / T h i s P R i s i n c l u d e d / } )
245
245
. reply ( 200 , { html_url : 'https://github.com/successcomment-3' } )
246
- . post ( `/repos/${ owner } /${ repo } /issues/3/labels` , '{"labels": ["released"]} ' )
246
+ . post ( `/repos/${ owner } /${ repo } /issues/3/labels` , '["released"]' )
247
247
. reply ( 200 , { } )
248
248
. post ( `/repos/${ owner } /${ repo } /issues/4/comments` , { body : / T h i s P R i s i n c l u d e d / } )
249
249
. reply ( 200 , { html_url : 'https://github.com/successcomment-4' } )
250
- . post ( `/repos/${ owner } /${ repo } /issues/4/labels` , '{"labels": ["released"]} ' )
250
+ . post ( `/repos/${ owner } /${ repo } /issues/4/labels` , '["released"]' )
251
251
. reply ( 200 , { } )
252
252
. post ( `/repos/${ owner } /${ repo } /issues/5/comments` , { body : / T h i s P R i s i n c l u d e d / } )
253
253
. reply ( 200 , { html_url : 'https://github.com/successcomment-5' } )
254
- . post ( `/repos/${ owner } /${ repo } /issues/5/labels` , '{"labels": ["released"]} ' )
254
+ . post ( `/repos/${ owner } /${ repo } /issues/5/labels` , '["released"]' )
255
255
. reply ( 200 , { } )
256
256
. post ( `/repos/${ owner } /${ repo } /issues/6/comments` , { body : / T h i s P R i s i n c l u d e d / } )
257
257
. reply ( 200 , { html_url : 'https://github.com/successcomment-6' } )
258
- . post ( `/repos/${ owner } /${ repo } /issues/6/labels` , '{"labels": ["released"]} ' )
258
+ . post ( `/repos/${ owner } /${ repo } /issues/6/labels` , '["released"]' )
259
259
. reply ( 200 , { } )
260
260
. get (
261
261
`/search/issues?q=${ escape ( 'in:title' ) } +${ escape ( `repo:${ owner } /${ repo } ` ) } +${ escape ( 'type:issue' ) } +${ escape (
@@ -313,7 +313,7 @@ test.serial(
313
313
. reply ( 200 , { merge_commit_sha : 'unrelated_sha' } )
314
314
. post ( `/repos/${ owner } /${ repo } /issues/1/comments` , { body : / T h i s P R i s i n c l u d e d / } )
315
315
. reply ( 200 , { html_url : 'https://github.com/successcomment-1' } )
316
- . post ( `/repos/${ owner } /${ repo } /issues/1/labels` , '{"labels": ["released"]} ' )
316
+ . post ( `/repos/${ owner } /${ repo } /issues/1/labels` , '["released"]' )
317
317
. reply ( 200 , { } )
318
318
. get (
319
319
`/search/issues?q=${ escape ( 'in:title' ) } +${ escape ( `repo:${ owner } /${ repo } ` ) } +${ escape ( 'type:issue' ) } +${ escape (
@@ -354,7 +354,7 @@ test.serial('Do not add comment and labels to open issues/PRs', async t => {
354
354
. reply ( 200 , [ { sha : commits [ 0 ] . hash } ] )
355
355
. post ( `/repos/${ owner } /${ repo } /issues/1/comments` , { body : / T h i s P R i s i n c l u d e d / } )
356
356
. reply ( 200 , { html_url : 'https://github.com/successcomment-1' } )
357
- . post ( `/repos/${ owner } /${ repo } /issues/1/labels` , '{"labels": ["released"]} ' )
357
+ . post ( `/repos/${ owner } /${ repo } /issues/1/labels` , '["released"]' )
358
358
. reply ( 200 , { } )
359
359
. get ( `/repos/${ owner } /${ repo } /issues/2` )
360
360
. reply ( 200 , { state : 'open' } )
@@ -431,7 +431,7 @@ test.serial('Do not add comment and labels to PR/issues from other repo', async
431
431
. reply ( 200 , { state : 'closed' } )
432
432
. post ( `/repos/${ owner } /${ repo } /issues/2/comments` , { body : / T h i s i s s u e h a s b e e n r e s o l v e d / } )
433
433
. reply ( 200 , { html_url : 'https://github.com/successcomment-2' } )
434
- . post ( `/repos/${ owner } /${ repo } /issues/2/labels` , '{"labels": ["released"]} ' )
434
+ . post ( `/repos/${ owner } /${ repo } /issues/2/labels` , '["released"]' )
435
435
. reply ( 200 , { } )
436
436
. get (
437
437
`/search/issues?q=${ escape ( 'in:title' ) } +${ escape ( `repo:${ owner } /${ repo } ` ) } +${ escape ( 'type:issue' ) } +${ escape (
@@ -476,7 +476,7 @@ test.serial('Ignore missing issues/PRs', async t => {
476
476
. reply ( 200 , [ { sha : commits [ 1 ] . hash } ] )
477
477
. post ( `/repos/${ owner } /${ repo } /issues/1/comments` , { body : / T h i s P R i s i n c l u d e d / } )
478
478
. reply ( 200 , { html_url : 'https://github.com/successcomment-1' } )
479
- . post ( `/repos/${ owner } /${ repo } /issues/1/labels` , '{"labels": ["released"]} ' )
479
+ . post ( `/repos/${ owner } /${ repo } /issues/1/labels` , '["released"]' )
480
480
. reply ( 200 , { } )
481
481
. post ( `/repos/${ owner } /${ repo } /issues/2/comments` , { body : / T h i s P R i s i n c l u d e d / } )
482
482
. times ( 3 )
@@ -485,7 +485,7 @@ test.serial('Ignore missing issues/PRs', async t => {
485
485
. reply ( 200 , { state : 'closed' } )
486
486
. post ( `/repos/${ owner } /${ repo } /issues/3/comments` , { body : / T h i s i s s u e h a s b e e n r e s o l v e d / } )
487
487
. reply ( 200 , { html_url : 'https://github.com/successcomment-3' } )
488
- . post ( `/repos/${ owner } /${ repo } /issues/3/labels` , '{"labels": ["released"]} ' )
488
+ . post ( `/repos/${ owner } /${ repo } /issues/3/labels` , '["released"]' )
489
489
. reply ( 200 , { } )
490
490
. get (
491
491
`/search/issues?q=${ escape ( 'in:title' ) } +${ escape ( `repo:${ owner } /${ repo } ` ) } +${ escape ( 'type:issue' ) } +${ escape (
@@ -535,7 +535,7 @@ test.serial('Add custom comment and labels', async t => {
535
535
body : / l a s t r e l e a s e : 1 \. 0 \. 0 n e x t R e l e a s e : 2 \. 0 \. 0 b r a n c h : m a s t e r c o m m i t s : 1 r e l e a s e s : 1 P R a t t r i b u t e : P R p r o p / ,
536
536
} )
537
537
. reply ( 200 , { html_url : 'https://github.com/successcomment-1' } )
538
- . post ( `/repos/${ owner } /${ repo } /issues/1/labels` , '{"labels": ["released on @next","released from master"]} ' )
538
+ . post ( `/repos/${ owner } /${ repo } /issues/1/labels` , '["released on @next","released from master"]' )
539
539
. reply ( 200 , { } )
540
540
. get (
541
541
`/search/issues?q=${ escape ( 'in:title' ) } +${ escape ( `repo:${ owner } /${ repo } ` ) } +${ escape ( 'type:issue' ) } +${ escape (
@@ -585,7 +585,7 @@ test.serial('Add custom label', async t => {
585
585
. reply ( 200 , [ { sha : commits [ 0 ] . hash } ] )
586
586
. post ( `/repos/${ owner } /${ repo } /issues/1/comments` , { body : / T h i s P R i s i n c l u d e d / } )
587
587
. reply ( 200 , { html_url : 'https://github.com/successcomment-1' } )
588
- . post ( `/repos/${ owner } /${ repo } /issues/1/labels` , '{"labels": ["custom label"]} ' )
588
+ . post ( `/repos/${ owner } /${ repo } /issues/1/labels` , '["custom label"]' )
589
589
. reply ( 200 , { } )
590
590
. get (
591
591
`/search/issues?q=${ escape ( 'in:title' ) } +${ escape ( `repo:${ owner } /${ repo } ` ) } +${ escape ( 'type:issue' ) } +${ escape (
0 commit comments