mirror of
https://github.com/daylinmorgan/oizys.git
synced 2025-01-02 18:20:43 -06:00
don't bail if response isn't ok
This commit is contained in:
parent
9b914e360f
commit
8606ed4523
1 changed files with 4 additions and 1 deletions
|
@ -74,11 +74,14 @@ proc postGhApi(url: string, body: JsonNode) =
|
||||||
"Authorization" : fmt"Bearer {ghToken}",
|
"Authorization" : fmt"Bearer {ghToken}",
|
||||||
"X-GitHub-Api-Version": "2022-11-28",
|
"X-GitHub-Api-Version": "2022-11-28",
|
||||||
})
|
})
|
||||||
|
var response: Response
|
||||||
try:
|
try:
|
||||||
let response = client.post(url, body = $body)
|
response = client.post(url, body = $body)
|
||||||
info fmt"Status: {response.code}"
|
info fmt"Status: {response.code}"
|
||||||
except:
|
except:
|
||||||
errorQuit "failed to get response code"
|
errorQuit "failed to get response code"
|
||||||
|
if response.code != Http204:
|
||||||
|
errorQuit "failed to post github api request"
|
||||||
|
|
||||||
proc getInProgressRun(
|
proc getInProgressRun(
|
||||||
workflow: string,
|
workflow: string,
|
||||||
|
|
Loading…
Reference in a new issue