-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Show Bitbucket Server/Data Center URL in UI and use better help links #713
Conversation
Update the Bitbucket credential UI to show the URL of the Bitbucket Server or Data Center instance, if we're talking to them. Also fix up the help links to point to a host-relative location; not always to Bitbucket Cloud pages. Note that the OAuth prompt will never been shown for Server/DC since 2FA is not supported there.
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.
Looks great! Just one comment for clarification.
@@ -30,17 +30,18 @@ public OAuthViewModel(IEnvironment environment) | |||
|
|||
private void LearnMore() | |||
{ | |||
BrowserUtils.OpenDefaultBrowser(_environment, "https://confluence.atlassian.com/bitbucket/two-step-verification-777023203.html"); | |||
// 2FA is not supported on Server/DC so this prompt will never be seen outside of Bitbucket Cloud |
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.
Helpful comment!
How does it display with |
@@ -94,6 +94,11 @@ public async Task<CredentialsPromptResult> GetCredentialsAsync(Uri targetUri, st | |||
TryFindHelperExecutablePath(out string helperPath)) | |||
{ | |||
var cmdArgs = new StringBuilder("userpass"); | |||
if (!BitbucketHostProvider.IsBitbucketOrg(targetUri)) |
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.
Can there be a unit test covering this?
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.
Added!
Add unit tests for the BitbucketAuthentication command line for UI helpers.
Add test for Bitbucket Cloud hostname detection method.
Update the Bitbucket credential UI to show the URL of the Bitbucket Server or Data Center instance, if we're talking to them.
Also fix up the help links to point to a host-relative location; not always to Bitbucket Cloud pages. Note that the OAuth prompt will never been shown for Server/DC since 2FA is not supported there.
This should help resolve some issues raised in #684