use code instead of status

This commit is contained in:
Daylin Morgan 2024-09-04 11:09:22 -05:00
parent e5ad1d945e
commit 7c28690527
Signed by: daylin
GPG key ID: 950D13E9719334AD

View file

@ -20,7 +20,10 @@ proc postGhApi(url: string, body: JsonNode) =
"X-GitHub-Api-Version": "2022-11-28",
})
let response = client.post(url, body = $body)
info fmt"Status: {response.status}"
try:
info fmt"Status: {response.code}"
except:
error "failed to get response code"
proc createDispatch*(workflowFileName: string, `ref`: string) =
## https://docs.github.com/en/rest/actions/workflows?apiVersion=2022-11-28#create-a-workflow-dispatch-event