-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Enhances remote provider connection flow #4411
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
base: main
Are you sure you want to change the base?
Conversation
8eccc89
to
613c7fa
Compare
613c7fa
to
b1c0c73
Compare
@axosoft-ramint What do we do with this? Reject, accept, transform to different requirements? cc @eamodio |
src/git/models/repositoryShape.ts
Outdated
remotePath?: string; | ||
remoteName?: string; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see remotePath
being added here but I don't see where it is being used?
Maybe call it bestRemoteName
since in the only two places we use this, it's the so-called "best remote" of the repo?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
{ integrationIds: [provider.integration!.id], source: this.source }, | ||
href=${createCommandLink<ConnectRemoteProviderCommandArgs>( | ||
'gitlens.connectRemoteProvider', | ||
{ remote: provider.remoteName!, repoPath: repo.path }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this guaranteed to be the remote that the current branch is located on since this is where the link is located?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a good question. For picking the right integration the remote is unnecessary, because the only thing that matters is the integration type.
The problem here is setting the default remote when the integration is connected.
The old flow, that goes through the web site (ConnectCloudIntegrationsCommand), does not set the default remote when the integration is connected.
In the new flow the default remote is set to the value of the parameter that might be wrong.
So, I suggest to make the remote
field optional and if it's not set, then do not set the default remote on connecting an integration. By doing that we:
- keep the old behavior (not setting the remote at all)
- won't fail with setting a wrong remote as default.
What do you think?
0fc9dfc
to
510dd0b
Compare
Description
This is a follow-up on #4387
Originates from this conversation:
How it should work (without a web page, using existing connection):
enable-remotes.mp4
How it works (it passes user through a web page) and what this pull request changes:
Checklist
Fixes $XXX -
orCloses #XXX -
prefix to auto-close the issue that your PR addresses