Skip to content

Commit

Permalink
fix(ng-dev/release): wait for next branch update action PR to be merged
Browse files Browse the repository at this point in the history
Instead of just creating the `switch-next-to-major` PR, we should also
prompt for merge and wait for it to be merged. This ensures the
caretaker does not get into bad state and completes the release action
as expected.
  • Loading branch information
devversion committed Jul 17, 2022
1 parent e264580 commit bdc8532
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions ng-dev/release/publish/actions/configure-next-as-major.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ export class ConfigureNextAsMajorAction extends ReleaseAction {
);

Log.info(green(' ✓ Next branch update pull request has been created.'));

await this.promptAndWaitForPullRequestMerged(pullRequest);
}

static override async isActive(active: ActiveReleaseTrains) {
Expand Down
4 changes: 3 additions & 1 deletion ng-dev/release/publish/test/configure-next-as-major.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,9 @@ describe('configure next as major action', () => {
.expectBranchRequest('master', 'MASTER_COMMIT_SHA')
.expectCommitStatusCheck('MASTER_COMMIT_SHA', 'success')
.expectFindForkRequest(fork)
.expectPullRequestToBeCreated('master', fork, expectedForkBranch, 200);
.expectPullRequestToBeCreated('master', fork, expectedForkBranch, 200)
.expectPullRequestMergeCheck(200, false)
.expectPullRequestMerge(200);

// In the fork, we make the staging branch appear as non-existent,
// so that the PR can be created properly without collisions.
Expand Down

0 comments on commit bdc8532

Please sign in to comment.