techdocs-backend: fix config loading in git-auth

This commit is contained in:
Patrik Oldsberg
2020-10-22 12:49:02 +02:00
parent 3dec8022d2
commit f495ba9c18
+5 -1
View File
@@ -93,7 +93,11 @@ export function getAzureHostToken(
export const getTokenForGitRepo = async (
repositoryUrl: string,
): Promise<string | undefined> => {
const config = await loadBackendConfig({ logger: getRootLogger() });
// TODO(Rugvip): Config should not be loaded here, pass it in instead
const config = await loadBackendConfig({
logger: getRootLogger(),
argv: process.argv,
});
const host = getGitHost(repositoryUrl);
const type = getGitRepoType(repositoryUrl);