From 7c28690527a1fa0e73c9bee4b77dc3403be0f773 Mon Sep 17 00:00:00 2001 From: Daylin Morgan Date: Wed, 4 Sep 2024 11:09:22 -0500 Subject: [PATCH] use code instead of status --- pkgs/oizys-nim/src/oizys/github.nim | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkgs/oizys-nim/src/oizys/github.nim b/pkgs/oizys-nim/src/oizys/github.nim index e0d8dee..5cc7822 100644 --- a/pkgs/oizys-nim/src/oizys/github.nim +++ b/pkgs/oizys-nim/src/oizys/github.nim @@ -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