From 459d553799bcab9b42d01df1565e3f54afb222ac Mon Sep 17 00:00:00 2001 From: Rhys Koedijk Date: Mon, 25 Nov 2024 17:44:37 +1300 Subject: [PATCH] Always clone repo, even if it already exists locally (#1478) --- extension/tasks/dependabotV2/index.ts | 1 - extension/tasks/dependabotV2/utils/getSharedVariables.ts | 7 ------- 2 files changed, 8 deletions(-) diff --git a/extension/tasks/dependabotV2/index.ts b/extension/tasks/dependabotV2/index.ts index 69576f5b..c809197b 100644 --- a/extension/tasks/dependabotV2/index.ts +++ b/extension/tasks/dependabotV2/index.ts @@ -90,7 +90,6 @@ async function run() { const dependabotUpdaterOptions = { sourceProvider: 'azure', - sourceLocalPath: taskInputs.repositorySourcePath, azureDevOpsAccessToken: taskInputs.systemAccessToken, gitHubAccessToken: taskInputs.githubAccessToken, collectorImage: undefined, // TODO: Add config for this? diff --git a/extension/tasks/dependabotV2/utils/getSharedVariables.ts b/extension/tasks/dependabotV2/utils/getSharedVariables.ts index 1cbbed1f..bcf83e67 100644 --- a/extension/tasks/dependabotV2/utils/getSharedVariables.ts +++ b/extension/tasks/dependabotV2/utils/getSharedVariables.ts @@ -27,8 +27,6 @@ export interface ISharedVariables { repository: string; /** Whether the repository was overridden via input */ repositoryOverridden: boolean; - /** Path to the local repository source. When specified, Dependabot will use this local repo rather than cloning it from the remote repo again */ - repositorySourcePath?: string; /** Organisation API endpoint URL */ apiEndpointUrl: string; @@ -107,10 +105,6 @@ export default function getSharedVariables(): ISharedVariables { } repository = encodeURI(repository); // encode special characters like spaces - // If the repository name is NOT overridden, then use the already cloned repository source directory - // for the dependabot update operation. This will save time and bandwidth as we don't have to clone the repository again. - let repositorySourcePath = repositoryOverridden ? undefined : tl.getVariable('Build.SourcesDirectory'); - const virtualDirectorySuffix = virtualDirectory?.length > 0 ? `${virtualDirectory}/` : ''; let apiEndpointUrl = `${protocol}://${hostname}:${port}/${virtualDirectorySuffix}`; @@ -168,7 +162,6 @@ export default function getSharedVariables(): ISharedVariables { project, repository, repositoryOverridden, - repositorySourcePath, apiEndpointUrl,