diff --git a/src/utils.ts b/src/utils.ts index 56b8de38..e3c98847 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -118,20 +118,19 @@ export function checkExportedData(exportCache: boolean, cacheInput: string | nul } export function resolveMode(mode: string | undefined, commitMode: boolean): 'PR' | 'COMMIT' | 'HYBRID' { - if (commitMode === false || mode === undefined) { - if (commitMode === true) { - return 'COMMIT' - } else { - return 'PR' - } - } else { - const upperCaseMode = mode.toUpperCase() + if (commitMode === true) { + return 'COMMIT' + } + + if (mode !== undefined) { + const upperCaseMode = mode.toUpperCase(); if (upperCaseMode === 'COMMIT') { return 'COMMIT' } else if (upperCaseMode === 'HYBRID') { return 'HYBRID' } } + return 'PR' }