Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix "GitObjectDoesNotExistException" error when not using targetRepositoryName config #1478

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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