diff --git a/lib/cli-create.ts b/lib/cli-create.ts index a102f83..7e2ca38 100644 --- a/lib/cli-create.ts +++ b/lib/cli-create.ts @@ -36,7 +36,7 @@ export async function createAction(options: CreateOptions) { if (response instanceof AxiosError) { throw response; } - if (response.status / 100 !== 2) { + if (Math.floor(response.status / 100) !== 2) { console.error(`Failed to create merge request: ${JSON.stringify(response.data)}, Status ${response.status}`); process.exit(1); } diff --git a/lib/cli-list.ts b/lib/cli-list.ts index f7eb14c..9d43aab 100644 --- a/lib/cli-list.ts +++ b/lib/cli-list.ts @@ -32,7 +32,7 @@ export async function listAction(options: ListOptions) { if (response instanceof AxiosError) { throw response; } - if (response.status / 100 !== 2) { + if (Math.floor(response.status / 100) !== 2) { console.error(`Failed to list merge requests: ${JSON.stringify(response.data)}, Status ${response.status}`); process.exit(1); } diff --git a/lib/cli-merge.ts b/lib/cli-merge.ts index 5e5a0de..7f94d0f 100644 --- a/lib/cli-merge.ts +++ b/lib/cli-merge.ts @@ -33,7 +33,7 @@ export async function mergeAction(options: AcceptOptions) { if (response instanceof AxiosError) { throw response; } - if (response.status / 100 !== 2) { + if (Math.floor(response.status / 100) !== 2) { console.error(`Failed to accept merge request: ${JSON.stringify(response.data)}, Status ${response.status}`); process.exit(1); }