Skip to content
This repository was archived by the owner on Dec 5, 2024. It is now read-only.

Commit 66b8bf6

Browse files
Merge branch 'github-enterprise' into releases/v1.2.0
2 parents d8fe6f7 + 0f623d5 commit 66b8bf6

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

src/GitHub.Api/Application/ApiClient.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ public void LoginWithToken(string token, Action<bool> result)
262262
Guard.ArgumentNotNull(result, "result");
263263

264264
new FuncTask<bool>(taskManager.Token,
265-
() => loginManager.LoginWithToken(HostAddress.WebUri.Host, token))
265+
() => loginManager.LoginWithToken(UriString.ToUriString(HostAddress.WebUri), token))
266266
.FinallyInUI((success, ex, res) =>
267267
{
268268
if (!success)
@@ -279,7 +279,7 @@ public void LoginWithToken(string token, Action<bool> result)
279279

280280
public void CreateOAuthToken(string code, Action<bool, string> result)
281281
{
282-
var command = "token -h " + HostAddress.ApiUri.Host;
282+
var command = "token -h " + HostAddress.WebUri.Host;
283283
var octorunTask = new OctorunTask(taskManager.Token, environment, command, code)
284284
.Configure(processManager);
285285

@@ -388,7 +388,7 @@ private Connection Connection
388388
{
389389
if (connection == null)
390390
{
391-
connection = keychain.Connections.FirstOrDefault(x => x.Host == (UriString)HostAddress.WebUri.Host);
391+
connection = keychain.Connections.FirstOrDefault(x => x.Host.ToUriString().Host == HostAddress.WebUri.Host);
392392
}
393393

394394
return connection;

src/UnityExtension/Assets/Editor/GitHub.Unity/UI/GitHubAuthenticationView.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ private void OnGUILogin()
160160
GUILayout.BeginHorizontal();
161161
{
162162
GUILayout.FlexibleSpace();
163-
if (GUILayout.Button("Signin with your browser", Styles.HyperlinkStyle))
163+
if (GUILayout.Button("Sign in with your browser", Styles.HyperlinkStyle))
164164
{
165165
GUI.FocusControl(null);
166166
Application.OpenURL(oAuthOpenUrl);
@@ -216,7 +216,7 @@ private void OnOAuthCallback(string state, string code)
216216
if (state.Equals(oAuthState))
217217
{
218218
isBusy = true;
219-
authenticationService.LoginWithOAuthCode(code, DoOAuthCodeResult);
219+
authenticationService.LoginWithOAuthCode(code, (b, s) => TaskManager.RunInUI(() => DoOAuthCodeResult(b, s)));
220220
}
221221
}
222222

@@ -292,7 +292,7 @@ private AuthenticationService AuthenticationService
292292
{
293293
if (authenticationService == null)
294294
{
295-
AuthenticationService = new AuthenticationService(HostAddress.GitHubDotComHostAddress.WebUri.Host, Platform.Keychain, Manager.ProcessManager, Manager.TaskManager, Environment);
295+
AuthenticationService = new AuthenticationService(UriString.ToUriString(HostAddress.GitHubDotComHostAddress.WebUri), Platform.Keychain, Manager.ProcessManager, Manager.TaskManager, Environment);
296296
}
297297
return authenticationService;
298298
}

src/UnityExtension/Assets/Editor/GitHub.Unity/UI/GitHubEnterpriseAuthenticationView.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ public override void OnGUI()
126126
GUILayout.BeginHorizontal();
127127
{
128128
GUILayout.FlexibleSpace();
129-
if (GUILayout.Button("Signin with your browser", Styles.HyperlinkStyle))
129+
if (GUILayout.Button("Sign in with your browser", Styles.HyperlinkStyle))
130130
{
131131
GUI.FocusControl(null);
132132
Application.OpenURL(oAuthOpenUrl);
@@ -334,7 +334,7 @@ private void OnOAuthCallback(string state, string code)
334334
if (state.Equals(oAuthState))
335335
{
336336
isBusy = true;
337-
authenticationService.LoginWithOAuthCode(code, DoOAuthCodeResult);
337+
authenticationService.LoginWithOAuthCode(code, (b, s) => TaskManager.RunInUI(() => DoOAuthCodeResult(b, s)));
338338
}
339339
});
340340
}

src/UnityExtension/Assets/Editor/GitHub.Unity/UI/PublishView.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ private void MaybeUpdateData()
5959
{
6060
connectionsNeedLoading = false;
6161
connections = Platform.Keychain.Connections.OrderByDescending(HostAddress.IsGitHubDotCom).ToArray();
62-
connectionLabels = connections.Select(c => HostAddress.IsGitHubDotCom(c) ? "GitHub" : c.Host).ToArray();
62+
connectionLabels = connections.Select(c => HostAddress.IsGitHubDotCom(c) ? "GitHub" : c.Host.ToUriString().Host).ToArray();
6363

6464
var connection = connections.First();
6565
selectedConnection = 0;

0 commit comments

Comments
 (0)