Skip to content

Commit d9655ad

Browse files
committed
Stops passing remote attribute from "Home"
in order to avoid setting an invalid remote. (#4387, #4411)
1 parent 029b8e0 commit d9655ad

File tree

4 files changed

+2
-5
lines changed

4 files changed

+2
-5
lines changed

src/commands/remoteProviders.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import type { CommandContext } from './commandContext';
1313
import { isCommandContextViewNodeHasRemote } from './commandContext.utils';
1414

1515
export interface ConnectRemoteProviderCommandArgs {
16-
remote: string;
16+
remote?: string;
1717
repoPath: string;
1818
}
1919

src/git/models/repositoryShape.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,5 @@ export interface RepositoryShape {
1414
integration?: { id: SupportedCloudIntegrationIds; connected: boolean };
1515
supportedFeatures: RemoteProviderSupportedFeatures;
1616
url?: string;
17-
bestRemoteName?: string;
1817
};
1918
}

src/git/utils/-webview/repository.utils.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,6 @@ export async function toRepositoryShapeWithProvider(
8484
: undefined,
8585
supportedFeatures: remote.provider.supportedFeatures,
8686
url: await remote.provider.url({ type: RemoteResourceType.Repo }),
87-
bestRemoteName: remote.name,
8887
};
8988
}
9089

src/webviews/apps/shared/components/repo-button-group.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ export class GlRepoButtonGroup extends GlElement {
200200
<a
201201
href=${createCommandLink<ConnectRemoteProviderCommandArgs>(
202202
'gitlens.connectRemoteProvider',
203-
{ remote: provider.bestRemoteName!, repoPath: repo.path },
203+
{ repoPath: repo.path },
204204
)}
205205
>
206206
Connect to ${repo.provider!.name}
@@ -228,7 +228,6 @@ export class GlRepoButtonGroup extends GlElement {
228228
part="connect-icon"
229229
appearance="toolbar"
230230
href=${createCommandLink<ConnectRemoteProviderCommandArgs>('gitlens.connectRemoteProvider', {
231-
remote: provider.bestRemoteName!,
232231
repoPath: repo.path,
233232
})}
234233
>

0 commit comments

Comments
 (0)