mirror of
https://github.com/zoriya/octokit.net.git
synced 2026-06-05 11:40:42 +00:00
delete repos created during integration tests
This commit is contained in:
@@ -17,6 +17,21 @@ namespace Octokit.Tests.Integration
|
||||
|
||||
public static Credentials Credentials { get { return _credentialsThunk.Value; }}
|
||||
|
||||
public static void DeleteRepo(Repository repository)
|
||||
{
|
||||
DeleteRepo(repository.Owner.Login, repository.Name);
|
||||
}
|
||||
|
||||
public static void DeleteRepo(string owner, string name)
|
||||
{
|
||||
var api = new GitHubClient("Integration Test Runner") { Credentials = Credentials };
|
||||
try
|
||||
{
|
||||
api.Repository.Delete(owner, name);
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
|
||||
public static string MakeNameWithTimestamp(string name)
|
||||
{
|
||||
return string.Concat(name, "-", DateTime.UtcNow.ToString("yyyyMMddhhmmssfff"));
|
||||
|
||||
Reference in New Issue
Block a user