Skip to content
Snippets Groups Projects
Unverified Commit 4e30552d authored by Rhys Arkins's avatar Rhys Arkins Committed by GitHub
Browse files

fix(merge-confidence): check token only for apiBaseUrl (#23231)

parent aa1d194e
No related branches found
No related tags found
No related merge requests found
......@@ -25,6 +25,9 @@ export const confidenceLevels: Record<MergeConfidence, number> = {
export function initConfig(): void {
apiBaseUrl = getApiBaseUrl();
token = getApiToken();
if (!is.nullOrUndefined(token)) {
logger.debug(`Merge confidence token found for ${apiBaseUrl}`);
}
}
export function resetConfig(): void {
......@@ -218,6 +221,7 @@ function getApiBaseUrl(): string {
export function getApiToken(): string | undefined {
return hostRules.find({
url: apiBaseUrl,
hostType,
})?.token;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment