Add CancelWorkflow method to github-api.psm1 and update get-new-tool-versions.ps1

This commit is contained in:
Nikita Bykov
2021-08-17 17:03:20 +03:00
parent 46a901fa87
commit 8c62a83204
2 changed files with 10 additions and 1 deletions

View File

@@ -124,6 +124,11 @@ class GitHubApi
}
}
[void] CancelWorkflow([string]$WorkflowId) {
$url = "actions/runs/$WorkflowId/cancel"
$this.InvokeRestMethod($url, 'POST', $null, $null)
}
[object] hidden InvokeRestMethod(
[string] $Url,
[string] $Method,