From 3124b8e36a89f32c24e640a744783ad3988e1402 Mon Sep 17 00:00:00 2001 From: Reinier Goltstein Date: Wed, 25 Oct 2023 17:22:24 +0200 Subject: [PATCH] refactor: fix unsafe enum comparison --- src/utilities/prTitleParsers.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/utilities/prTitleParsers.ts b/src/utilities/prTitleParsers.ts index 24e343ed284..a51a385a399 100644 --- a/src/utilities/prTitleParsers.ts +++ b/src/utilities/prTitleParsers.ts @@ -1,7 +1,7 @@ /* eslint-disable @typescript-eslint/no-non-null-assertion */ /* eslint-disable max-statements */ -import { parseInputMergePreset } from './inputParsers'; +import {AllowedMergePresets, parseInputMergePreset} from './inputParsers'; export const checkPullRequestTitleForMergePreset = (title: string): boolean => { const category = parseInputMergePreset(); @@ -44,7 +44,7 @@ export const checkPullRequestTitleForMergePreset = (title: string): boolean => { const toMinor = toMatchGroups!.minor!; if (Number.parseInt(fromMinor, 10) !== Number.parseInt(toMinor, 10)) { - return category === 'DEPENDABOT_MINOR'; + return category === AllowedMergePresets.DEPENDABOT_MINOR; } return true;