Skip to content

Commit

Permalink
refactor: fix unsafe enum comparison
Browse files Browse the repository at this point in the history
  • Loading branch information
mrgoltstein committed Oct 25, 2023
1 parent 9b64bec commit 3124b8e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/utilities/prTitleParsers.ts
Original file line number Diff line number Diff line change
@@ -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();
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 3124b8e

Please sign in to comment.