Skip to content

Commit

Permalink
fix: update cli success condition
Browse files Browse the repository at this point in the history
  • Loading branch information
uanid committed Jun 14, 2024
1 parent d1d5cfa commit 8dc0b05
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/cli-create.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
2 changes: 1 addition & 1 deletion lib/cli-list.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
2 changes: 1 addition & 1 deletion lib/cli-merge.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 8dc0b05

Please sign in to comment.