From 6b744d421887c55bf6ad12fc6f98090b7efe7cbd Mon Sep 17 00:00:00 2001 From: Nikita Bykov Date: Tue, 13 Jul 2021 17:14:29 +0300 Subject: [PATCH] Add CancelWorkflow method --- github/github-api.psm1 | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/github/github-api.psm1 b/github/github-api.psm1 index 3103ed0..6ba32c7 100644 --- a/github/github-api.psm1 +++ b/github/github-api.psm1 @@ -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,