Skip to content

Commit ba76ac9

Browse files
committed
bitbucket: only show URL if not Bitbucket Cloud
Only show the URL if the remote is NOT Bitbucket Cloud in the in-proc UI. This is same behaviour as the helper UI.
1 parent 01eca12 commit ba76ac9

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

src/shared/Atlassian.Bitbucket/BitbucketAuthentication.cs

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,12 +110,20 @@ private async Task<CredentialsPromptResult> GetCredentialsViaUiAsync(
110110
{
111111
var viewModel = new CredentialsViewModel(Context.Environment)
112112
{
113-
Url = targetUri,
114-
UserName = userName,
115113
ShowOAuth = (modes & AuthenticationModes.OAuth) != 0,
116114
ShowBasic = (modes & AuthenticationModes.Basic) != 0
117115
};
118116

117+
if (!BitbucketHelper.IsBitbucketOrg(targetUri))
118+
{
119+
viewModel.Url = targetUri;
120+
}
121+
122+
if (!string.IsNullOrWhiteSpace(userName))
123+
{
124+
viewModel.UserName = userName;
125+
}
126+
119127
await AvaloniaUi.ShowViewAsync<CredentialsView>(viewModel, GetParentWindowHandle(), CancellationToken.None);
120128

121129
ThrowIfWindowCancelled(viewModel);

0 commit comments

Comments
 (0)