Skip to content

Commit ca896df

Browse files
feature: adds other environment support (#14)
1 parent 8068e31 commit ca896df

3 files changed

Lines changed: 8 additions & 6 deletions

File tree

.changeset/rare-facts-accept.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@codacy/codacy-cloud-cli": patch
3+
---
4+
5+
Adds possibility of using the cli againsta other environments

package-lock.json

Lines changed: 2 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import { registerLogoutCommand } from "./commands/logout";
1818

1919
const program = new Command();
2020

21-
OpenAPI.BASE = "https://app.codacy.com/api/v3";
21+
OpenAPI.BASE = (process.env.CODACY_API_BASE_URL || "https://app.codacy.com").replace(/\/$/, "") + "/api/v3";
2222
OpenAPI.HEADERS = {
2323
"api-token": process.env.CODACY_API_TOKEN || "",
2424
"X-Codacy-Origin": "cli-cloud-tool",

0 commit comments

Comments
 (0)