mirror of
https://github.com/zoriya/octokit.net.git
synced 2026-06-05 11:40:42 +00:00
use a different property to get the current username, instead of Credentials
This commit is contained in:
@@ -8,6 +8,13 @@ namespace Octokit.Tests.Integration
|
||||
static readonly Lazy<Credentials> _credentialsThunk = new Lazy<Credentials>(() =>
|
||||
{
|
||||
var githubUsername = Environment.GetEnvironmentVariable("OCTOKIT_GITHUBUSERNAME");
|
||||
UserName = githubUsername;
|
||||
|
||||
var githubToken = Environment.GetEnvironmentVariable("OCTOKIT_OAUTHTOKEN");
|
||||
|
||||
if (githubToken != null)
|
||||
return new Credentials(githubToken);
|
||||
|
||||
var githubPassword = Environment.GetEnvironmentVariable("OCTOKIT_GITHUBPASSWORD");
|
||||
|
||||
if (githubUsername == null || githubPassword == null)
|
||||
@@ -16,6 +23,8 @@ namespace Octokit.Tests.Integration
|
||||
return new Credentials(githubUsername, githubPassword);
|
||||
});
|
||||
|
||||
public static string UserName { get; private set; }
|
||||
|
||||
public static Credentials Credentials { get { return _credentialsThunk.Value; }}
|
||||
|
||||
public static void DeleteRepo(Repository repository)
|
||||
|
||||
Reference in New Issue
Block a user