diff --git a/src/container.ts b/src/container.ts index 7cba0c41a6ce7..46517946fa7ca 100644 --- a/src/container.ts +++ b/src/container.ts @@ -919,6 +919,11 @@ export class Container { @memoize() private get baseGkDevUri(): Uri { + if (this.prereleaseOrDebugging) { + const url: string | undefined = configuration.getAny('gitkraken.url.gkdev.base'); + if (url) return Uri.parse(url); + } + if (this.env === 'staging') { return Uri.parse('https://staging.gitkraken.dev'); } diff --git a/src/plus/gk/serverConnection.ts b/src/plus/gk/serverConnection.ts index 0f8c369e30bb9..18aed2eb2aad9 100644 --- a/src/plus/gk/serverConnection.ts +++ b/src/plus/gk/serverConnection.ts @@ -27,6 +27,7 @@ import { memoize } from '../../system/decorators/memoize'; import { Logger } from '../../system/logger'; import type { LogScope } from '../../system/logger.scope'; import { getLogScope } from '../../system/logger.scope'; +import { configuration } from '../../system/vscode/configuration'; interface FetchOptions { cancellation?: CancellationToken; @@ -47,6 +48,11 @@ export class ServerConnection implements Disposable { @memoize() private get baseApiUri(): Uri { + if (this.container.prereleaseOrDebugging) { + const url: string | undefined = configuration.getAny('gitkraken.url.api'); + if (url) return Uri.parse(url); + } + if (this.container.env === 'staging') { return Uri.parse('https://stagingapi.gitkraken.com'); } @@ -64,6 +70,11 @@ export class ServerConnection implements Disposable { @memoize() private get baseGkDevApiUri(): Uri { + if (this.container.prereleaseOrDebugging) { + const url: string | undefined = configuration.getAny('gitkraken.url.gkdev.api'); + if (url) return Uri.parse(url); + } + if (this.container.env === 'staging') { return Uri.parse('https://staging-api.gitkraken.dev'); }