Update CreateWorkflowDispatch method

pull/14/head
MaksimZhukov 4 years ago
parent 7e2bc9a237
commit 2ea972432a

@ -62,7 +62,6 @@ function Validate-ReleaseAvailability {
Write-Host "Release was successfully created: $($createdRelease.html_url)"
return
}
$RetryCount
$RetryCount--
Start-Sleep -Seconds $RetryIntervalSec

@ -103,14 +103,17 @@ class GitHubApi
return $this.InvokeRestMethod($url, 'GET', $null, $null)
}
[void] CreateWorkflowDispatch([string]$WorkflowFileName, [string]$Ref, [object]$Inputs) {
[void] CreateWorkflowDispatch([string]$WorkflowFileName, [string]$Ref, [string]$Inputs) {
$url = "actions/workflows/${WorkflowFileName}/dispatches"
$body = @{
ref = $Ref
inputs = $Inputs
} | ConvertTo-Json
$body = @{ ref = $Ref }
if ($Inputs) {
$body.inputs = $Inputs
}
$this.InvokeRestMethod($url, 'POST', $null, $body)
$jsonBody = $body | ConvertTo-Json
$this.InvokeRestMethod($url, 'POST', $null, $jsonBody)
}
[string] hidden BuildUrl([string]$Url, [string]$RequestParams) {

Loading…
Cancel
Save