From ae069b0eb5f2e2a807ac8c9fc0571d91c5ee40e6 Mon Sep 17 00:00:00 2001 From: Rhys Arkins <rhys@arkins.net> Date: Tue, 10 Mar 2020 12:00:36 +0100 Subject: [PATCH] fix(github): set stabilityStatus using Enum Closes #5683 --- lib/workers/branch/index.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/workers/branch/index.ts b/lib/workers/branch/index.ts index 401352fccc..83fca46d23 100644 --- a/lib/workers/branch/index.ts +++ b/lib/workers/branch/index.ts @@ -243,7 +243,7 @@ export async function processBranch( ) { // Only set a stability status check if one or more of the updates contain // both a stabilityDays setting and a releaseTimestamp - config.stabilityStatus = 'success'; + config.stabilityStatus = BranchStatus.green; // Default to 'success' but set 'pending' if any update is pending const oneDay = 24 * 60 * 60 * 1000; for (const upgrade of config.upgrades) { @@ -262,7 +262,7 @@ export async function processBranch( }, 'Update has not passed stability days' ); - config.stabilityStatus = 'pending'; + config.stabilityStatus = BranchStatus.yellow; } } } @@ -270,7 +270,7 @@ export async function processBranch( if ( !masterIssueCheck && !branchExists && - config.stabilityStatus === 'pending' && + config.stabilityStatus === BranchStatus.yellow && ['not-pending', 'status-success'].includes(config.prCreation) ) { logger.debug('Skipping branch creation due to stability days not met'); -- GitLab