Skip to content

Commit

Permalink
Always clone repo, even if it already exists locally (#1478)
Browse files Browse the repository at this point in the history
  • Loading branch information
rhyskoedijk authored Nov 25, 2024
1 parent b3e451f commit 459d553
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 8 deletions.
1 change: 0 additions & 1 deletion extension/tasks/dependabotV2/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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?
Expand Down
7 changes: 0 additions & 7 deletions extension/tasks/dependabotV2/utils/getSharedVariables.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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}`;

Expand Down Expand Up @@ -168,7 +162,6 @@ export default function getSharedVariables(): ISharedVariables {
project,
repository,
repositoryOverridden,
repositorySourcePath,

apiEndpointUrl,

Expand Down

0 comments on commit 459d553

Please sign in to comment.