@@ -185,11 +185,10 @@ describe('common release action logic', () => {
185185 const customRegistryUrl = 'https://custom-npm-registry.google.com' ;
186186
187187 repo
188- . expectBranchRequest ( branchName , 'STAGING_SHA' )
189- . expectCommitRequest ( 'STAGING_SHA' , `release: cut the v${ version } release` )
190- . expectCommitCompareRequest ( 'BEFORE_STAGING_SHA' , 'STAGING_SHA' , {
191- status : 'ahead' ,
192- ahead_by : 1 ,
188+ . expectBranchRequest ( branchName , {
189+ sha : 'STAGING_SHA' ,
190+ parents : [ { sha : 'BEFORE_STAGING_SHA' } ] ,
191+ commit : { message : `release: cut the v${ version } release` } ,
193192 } )
194193 . expectTagToBeCreated ( tagName , 'STAGING_SHA' )
195194 . expectReleaseToBeCreated ( version . toString ( ) , tagName , true ) ;
@@ -231,11 +230,10 @@ describe('common release action logic', () => {
231230 . commit ( 'feat(test): second commit' ) ;
232231
233232 repo
234- . expectBranchRequest ( branchName , 'STAGING_SHA' )
235- . expectCommitRequest ( 'STAGING_SHA' , `release: cut the v${ version } release` )
236- . expectCommitCompareRequest ( 'BEFORE_STAGING_SHA' , 'STAGING_SHA' , {
237- status : 'ahead' ,
238- ahead_by : 1 ,
233+ . expectBranchRequest ( branchName , {
234+ sha : 'STAGING_SHA' ,
235+ parents : [ { sha : 'BEFORE_STAGING_SHA' } ] ,
236+ commit : { message : `release: cut the v${ version } release` } ,
239237 } )
240238 . expectTagToBeCreated ( tagName , 'STAGING_SHA' )
241239 . expectReleaseToBeCreated (
@@ -285,13 +283,15 @@ describe('common release action logic', () => {
285283 git . commit ( 'feat(test): first commit' ) ;
286284
287285 repo
288- . expectBranchRequest ( branchName , 'STAGING_SHA' )
289- . expectCommitRequest ( 'STAGING_SHA' , `release: cut the v${ version } release` )
286+ . expectBranchRequest ( branchName , {
287+ sha : 'STAGING_SHA' ,
288+ commit : { message : `release: cut the v${ version } release` } ,
289+ } )
290290 . expectCommitStatusCheck ( 'STAGING_SHA' , 'success' )
291291 . expectFindForkRequest ( fork )
292292 . expectPullRequestToBeCreated ( branchName , fork , 'release-stage-10.1.0-next.0' , 10 ) ;
293293
294- fork . expectBranchRequest ( 'release-stage-10.1.0-next.0' , null ) ;
294+ fork . expectBranchRequest ( 'release-stage-10.1.0-next.0' ) ;
295295
296296 const stagingPromise = instance . testStagingWithBuild (
297297 version ,
@@ -334,11 +334,10 @@ describe('common release action logic', () => {
334334 ) ;
335335
336336 repo
337- . expectBranchRequest ( branchName , 'STAGING_SHA' )
338- . expectCommitRequest ( 'STAGING_SHA' , `release: cut the v${ version } release` )
339- . expectCommitCompareRequest ( 'BEFORE_STAGING_SHA' , 'STAGING_SHA' , {
340- status : 'ahead' ,
341- ahead_by : 1 ,
337+ . expectBranchRequest ( branchName , {
338+ sha : 'STAGING_SHA' ,
339+ parents : [ { sha : 'BEFORE_STAGING_SHA' } ] ,
340+ commit : { message : `release: cut the v${ version } release` } ,
342341 } )
343342 . expectTagToBeCreated ( tagName , 'STAGING_SHA' )
344343 . expectReleaseToBeCreated (
@@ -366,13 +365,11 @@ describe('common release action logic', () => {
366365 ) ;
367366 const { version, branchName} = baseReleaseTrains . latest ;
368367
369- repo
370- . expectBranchRequest ( branchName , 'STAGING_SHA' )
371- . expectCommitRequest ( 'STAGING_SHA' , `release: cut the v${ version } release` )
372- . expectCommitCompareRequest ( 'BEFORE_STAGING_SHA' , 'STAGING_SHA' , {
373- status : 'ahead' ,
374- ahead_by : 2 , // this implies that another unknown/new commit is in between.
375- } ) ;
368+ repo . expectBranchRequest ( branchName , {
369+ sha : 'STAGING_SHA' ,
370+ parents : [ { sha : 'THE_ONE_BEFORE_STAGING_SHA' } ] ,
371+ commit : { message : `release: cut the v${ version } release` } ,
372+ } ) ;
376373
377374 spyOn ( Log , 'error' ) ;
378375
@@ -458,7 +455,7 @@ describe('common release action logic', () => {
458455 . expectPullRequestMerge ( 200 ) ;
459456
460457 // Simulate that the fork branch name is available.
461- fork . expectBranchRequest ( forkBranchName , null ) ;
458+ fork . expectBranchRequest ( forkBranchName ) ;
462459
463460 await instance . testCherryPickWithPullRequest ( version , branchName ) ;
464461
@@ -488,7 +485,7 @@ describe('common release action logic', () => {
488485 . expectPullRequestMergeCheck ( 200 , true ) ;
489486
490487 // Simulate that the fork branch name is available.
491- fork . expectBranchRequest ( forkBranchName , null ) ;
488+ fork . expectBranchRequest ( forkBranchName ) ;
492489
493490 await instance . testCherryPickWithPullRequest ( version , branchName ) ;
494491
@@ -510,7 +507,7 @@ describe('common release action logic', () => {
510507 . expectPullRequestMerge ( 200 ) ;
511508
512509 // Simulate that the fork branch name is available.
513- fork . expectBranchRequest ( forkBranchName , null ) ;
510+ fork . expectBranchRequest ( forkBranchName ) ;
514511
515512 await instance . testCherryPickWithPullRequest ( version , branchName ) ;
516513
0 commit comments