Skip to content

Commit

Permalink
fix(github): set stabilityStatus using Enum
Browse files Browse the repository at this point in the history
Closes #5683
  • Loading branch information
rarkins committed Mar 10, 2020
1 parent 2599ea5 commit ae069b0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/workers/branch/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -262,15 +262,15 @@ export async function processBranch(
},
'Update has not passed stability days'
);
config.stabilityStatus = 'pending';
config.stabilityStatus = BranchStatus.yellow;
}
}
}
// Don't create a branch if we know it will be status 'pending'
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');
Expand Down

0 comments on commit ae069b0

Please sign in to comment.