Skip to content

Commit 3e7f8e7

Browse files
committed
chore: Update resolveMode function to handle commitMode
1 parent ef820d2 commit 3e7f8e7

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

src/utils.ts

+7-8
Original file line numberDiff line numberDiff line change
@@ -118,20 +118,19 @@ export function checkExportedData(exportCache: boolean, cacheInput: string | nul
118118
}
119119

120120
export function resolveMode(mode: string | undefined, commitMode: boolean): 'PR' | 'COMMIT' | 'HYBRID' {
121-
if (commitMode === false || mode === undefined) {
122-
if (commitMode === true) {
123-
return 'COMMIT'
124-
} else {
125-
return 'PR'
126-
}
127-
} else {
128-
const upperCaseMode = mode.toUpperCase()
121+
if (commitMode === true) {
122+
return 'COMMIT'
123+
}
124+
125+
if (mode !== undefined) {
126+
const upperCaseMode = mode.toUpperCase();
129127
if (upperCaseMode === 'COMMIT') {
130128
return 'COMMIT'
131129
} else if (upperCaseMode === 'HYBRID') {
132130
return 'HYBRID'
133131
}
134132
}
133+
135134
return 'PR'
136135
}
137136

0 commit comments

Comments
 (0)