Merge pull request #2994 from spotify/rugvip/conflagrate

config-loader: switch to using --config options to load in config
This commit is contained in:
Patrik Oldsberg
2020-10-22 18:01:21 +02:00
committed by GitHub
38 changed files with 271 additions and 370 deletions
@@ -237,7 +237,10 @@ export const getDefaultBranch = async (
repositoryUrl: string,
): Promise<string> => {
// TODO(Rugvip): Config should not be loaded here, pass it in instead
const config = await loadBackendConfig({ logger: getRootLogger() });
const config = await loadBackendConfig({
logger: getRootLogger(),
argv: process.argv,
});
const type = getGitRepoType(repositoryUrl);
try {
+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);