Tweak GpgKeyContext inline with recent change made to other helper contexts

This commit is contained in:
Ryan Gribble
2016-06-09 00:03:07 +10:00
parent 9e594a6451
commit 3977765796
4 changed files with 22 additions and 10 deletions
+16
View File
@@ -159,6 +159,22 @@ namespace Octokit.Tests.Integration
catch { }
}
public static void DeleteGpgKey(IConnection connection, GpgKey key)
{
if (key != null)
DeleteGpgKey(connection, key.Id);
}
public static void DeleteGpgKey(IConnection connection, int keyId)
{
try
{
var client = new GitHubClient(connection);
client.User.GpgKey.Delete(keyId).Wait(TimeSpan.FromSeconds(15));
}
catch { }
}
public static string MakeNameWithTimestamp(string name)
{
return string.Concat(name, "-", DateTime.UtcNow.ToString("yyyyMMddhhmmssfff"));