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

Commit 67aa02d

Browse files
More cleanup
1 parent 872389b commit 67aa02d

File tree

6 files changed

+12
-20
lines changed

6 files changed

+12
-20
lines changed

src/GitHub.Api/Application/ApiClient.cs

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,9 @@ public ApiClient(IKeychain keychain, IProcessManager processManager, ITaskManage
3232
{
3333
Guard.ArgumentNotNull(keychain, nameof(keychain));
3434

35-
if (host == null)
36-
{
37-
host = UriString.ToUriString(HostAddress.GitHubDotComHostAddress.WebUri);
38-
}
39-
else
40-
{
41-
host = new UriString(host.ToRepositoryUri().GetComponents(UriComponents.SchemeAndServer, UriFormat.SafeUnescaped));
42-
}
35+
host = host == null
36+
? UriString.ToUriString(HostAddress.GitHubDotComHostAddress.WebUri)
37+
: new UriString(host.ToRepositoryUri().GetComponents(UriComponents.SchemeAndServer, UriFormat.SafeUnescaped));
4338

4439
HostAddress = HostAddress.Create(host);
4540

src/GitHub.Api/Application/ApplicationManagerBase.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -210,8 +210,6 @@ public void SetupGit(GitInstaller.GitInstallationState state)
210210
return true;
211211
}).RunSynchronously();
212212

213-
Logger.Trace("Credential Helper: {0}", credentialHelper);
214-
215213
if (string.IsNullOrEmpty(credentialHelper))
216214
{
217215
Logger.Warning("No Windows CredentialHelper found: Setting to wincred");

src/GitHub.Api/Authentication/ILoginManager.cs

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ interface ILoginManager
1010
/// <summary>
1111
/// Attempts to log into a GitHub server with a username and password.
1212
/// </summary>
13-
/// <param name="host"></param>
13+
/// <param name="host">The host.</param>
1414
/// <param name="username">The username.</param>
1515
/// <param name="password">The password.</param>
1616
/// <returns>The logged in user.</returns>
@@ -28,8 +28,12 @@ interface ILoginManager
2828
/// <inheritdoc/>
2929
ITask Logout(UriString hostAddress);
3030

31-
bool LoginWithToken(
32-
UriString host,
33-
string token);
31+
/// <summary>
32+
/// Attempts to log into a GitHub server with a token.
33+
/// </summary>
34+
/// <param name="host">The host.</param>
35+
/// <param name="token">The token.</param>
36+
/// <returns></returns>
37+
bool LoginWithToken(UriString host, string token);
3438
}
3539
}

src/GitHub.Api/Authentication/Keychain.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,8 +133,6 @@ private KeychainAdapter FindOrCreateAdapter(UriString host)
133133
KeychainAdapter value;
134134
if (!keychainAdapters.TryGetValue(host, out value))
135135
{
136-
logger.Trace("Creating Adapter {0}", host);
137-
138136
value = new KeychainAdapter();
139137
keychainAdapters.Add(host, value);
140138
}

src/GitHub.Api/Authentication/LoginManager.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,7 @@ public LoginManager(
4545
this.environment = environment;
4646
}
4747

48-
public bool LoginWithToken(
49-
UriString host,
50-
string token)
48+
public bool LoginWithToken(UriString host, string token)
5149
{
5250
Guard.ArgumentNotNull(host, nameof(host));
5351
Guard.ArgumentNotNullOrWhiteSpace(token, nameof(token));

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
using System.Linq;
33
using UnityEditor;
44
using UnityEngine;
5-
using Object = System.Object;
65

76
namespace GitHub.Unity
87
{

0 commit comments

Comments
 (0)