From c97defc88f501c881eac2b9c9a80d801cde6f4a8 Mon Sep 17 00:00:00 2001 From: Rhys Arkins <rhys@arkins.net> Date: Tue, 10 Mar 2020 11:11:08 +0100 Subject: [PATCH] refactor: AwaitingBranchAutomerge -> BlockeddByBranchAutomerge --- lib/workers/common.ts | 2 +- lib/workers/pr/index.spec.ts | 2 +- lib/workers/pr/index.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/workers/common.ts b/lib/workers/common.ts index 6a9ca07836..6bdd60731d 100644 --- a/lib/workers/common.ts +++ b/lib/workers/common.ts @@ -46,10 +46,10 @@ export interface BranchUpgradeConfig } export enum PrResult { - AwaitingBranchAutomerge = 'AwaitingBranchAutomerge', AwaitingApproval = 'AwaitingApproval', AwaitingGreenBranch = 'AwaitingGreenBranch', AwaitingNotPending = 'AwaitingNotPending', + BlockeddByBranchAutomerge = 'BlockeddByBranchAutomerge', Created = 'Created', Error = 'Error', ErrorAlreadyExists = 'ErrorAlreadyExists', diff --git a/lib/workers/pr/index.spec.ts b/lib/workers/pr/index.spec.ts index e7c980cba6..bad71f5767 100644 --- a/lib/workers/pr/index.spec.ts +++ b/lib/workers/pr/index.spec.ts @@ -433,7 +433,7 @@ describe('workers/pr', () => { platform.getBranchStatus.mockResolvedValueOnce(BranchStatus.yellow); platform.getBranchLastCommitTime.mockResolvedValueOnce(new Date()); const { prResult, pr } = await prWorker.ensurePr(config); - expect(prResult).toEqual(PrResult.AwaitingBranchAutomerge); + expect(prResult).toEqual(PrResult.BlockeddByBranchAutomerge); expect(pr).toBeUndefined(); }); it('should not return no PR if branch automerging taking too long', async () => { diff --git a/lib/workers/pr/index.ts b/lib/workers/pr/index.ts index d0c3f49c60..cf9c9b6073 100644 --- a/lib/workers/pr/index.ts +++ b/lib/workers/pr/index.ts @@ -133,7 +133,7 @@ export async function ensurePr( logger.debug(`Branch tests failed, so will create PR`); } else { // Branch should be automerged, so we don't want to create a PR - return { prResult: PrResult.AwaitingBranchAutomerge }; + return { prResult: PrResult.BlockeddByBranchAutomerge }; } } if (config.prCreation === 'status-success') { -- GitLab