Skip to content

Commit

Permalink
fix(merge-confidence): check token only for apiBaseUrl (#23231)
Browse files Browse the repository at this point in the history
  • Loading branch information
rarkins committed Jul 7, 2023
1 parent aa1d194 commit 4e30552
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/util/merge-confidence/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -218,6 +221,7 @@ function getApiBaseUrl(): string {

export function getApiToken(): string | undefined {
return hostRules.find({
url: apiBaseUrl,
hostType,
})?.token;
}
Expand Down

0 comments on commit 4e30552

Please sign in to comment.