@@ -2175,14 +2175,17 @@ test('Add comment on issues/PR and skip label if "successComment" is unset / "re
2175
2175
. getOnce ( `https://api.github.local/repos/${ owner } /${ repo } ` , {
2176
2176
full_name : `${ owner } /${ repo } ` ,
2177
2177
} )
2178
- . getOnce (
2179
- `https://api.github.local/search/issues?q=${ encodeURIComponent (
2180
- `repo:${ owner } /${ repo } ` ,
2181
- ) } +${ encodeURIComponent ( "type:pr" ) } +${ encodeURIComponent (
2182
- "is:merged" ,
2183
- ) } +${ commits . map ( ( commit ) => commit . hash ) . join ( "+" ) } `,
2184
- { items : prs } ,
2185
- )
2178
+ . postOnce ( "https://api.github.local/graphql" , {
2179
+ data : {
2180
+ repository : {
2181
+ commit123 : {
2182
+ associatedPullRequests : {
2183
+ nodes : [ prs [ 0 ] ] ,
2184
+ } ,
2185
+ } ,
2186
+ } ,
2187
+ } ,
2188
+ } )
2186
2189
. getOnce (
2187
2190
`https://api.github.local/repos/${ owner } /${ repo } /pulls/1/commits` ,
2188
2191
[ { sha : commits [ 0 ] . hash } ] ,
@@ -2261,14 +2264,17 @@ test('Skip comment on issues/PR and add label if "successComment" is "false" / "
2261
2264
. getOnce ( `https://api.github.local/repos/${ owner } /${ repo } ` , {
2262
2265
full_name : `${ owner } /${ repo } ` ,
2263
2266
} )
2264
- . getOnce (
2265
- `https://api.github.local/search/issues?q=${ encodeURIComponent (
2266
- `repo:${ owner } /${ repo } ` ,
2267
- ) } +${ encodeURIComponent ( "type:pr" ) } +${ encodeURIComponent (
2268
- "is:merged" ,
2269
- ) } +${ commits . map ( ( commit ) => commit . hash ) . join ( "+" ) } `,
2270
- { items : prs } ,
2271
- )
2267
+ . postOnce ( "https://api.github.local/graphql" , {
2268
+ data : {
2269
+ repository : {
2270
+ commit123 : {
2271
+ associatedPullRequests : {
2272
+ nodes : [ prs [ 0 ] ] ,
2273
+ } ,
2274
+ } ,
2275
+ } ,
2276
+ } ,
2277
+ } )
2272
2278
. getOnce (
2273
2279
`https://api.github.local/repos/${ owner } /${ repo } /pulls/1/commits` ,
2274
2280
[ { sha : commits [ 0 ] . hash } ] ,
0 commit comments