mirror of
https://github.com/zoriya/octokit.net.git
synced 2025-12-06 07:16:09 +00:00
restore helper function
This commit is contained in:
@@ -87,6 +87,21 @@ public class EnterpriseManagementConsoleClientTests
|
||||
}
|
||||
}
|
||||
|
||||
private async Task DeleteManagementAuthorizedKeyIfExists(string keyData)
|
||||
{
|
||||
// Check if key already exists
|
||||
var keys = await _github.Enterprise.ManagementConsole.GetAllAuthorizedKeys(
|
||||
EnterpriseHelper.ManagementConsolePassword);
|
||||
|
||||
// Delete it if so
|
||||
if (keys.Any(x => x.Key == keyData))
|
||||
{
|
||||
await _github.Enterprise.ManagementConsole.DeleteAuthorizedKey(
|
||||
new AuthorizedKeyRequest(keyData),
|
||||
EnterpriseHelper.ManagementConsolePassword).ConfigureAwait(false);
|
||||
}
|
||||
}
|
||||
|
||||
[GitHubEnterpriseManagementConsoleTest]
|
||||
public async Task CanGetAllAuthorizedKeys()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user