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

Show Bitbucket Server/Data Center URL in UI and use better help links #713

Merged
merged 3 commits into from
May 31, 2022

Conversation

mjcheetham
Copy link
Collaborator

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

image

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.
Copy link
Contributor

@ldennington ldennington left a 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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Helpful comment!

@mminns
Copy link
Contributor

mminns commented May 26, 2022

How does it display with usehttppath settings on?

@@ -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))
Copy link
Contributor

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?

Copy link
Collaborator Author

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.
@mjcheetham
Copy link
Collaborator Author

How does it display with usehttppath settings on?

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants