From 64d93803d18f9137179293bbee1364ee2022ebb6 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 5 Nov 2024 11:45:01 +0200 Subject: Review --- mod/mod-ci-github-gh.hxx | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/mod/mod-ci-github-gh.hxx b/mod/mod-ci-github-gh.hxx index e6e9ba6..e27f798 100644 --- a/mod/mod-ci-github-gh.hxx +++ b/mod/mod-ci-github-gh.hxx @@ -64,16 +64,20 @@ namespace brep string node_id; string name; string status; - optional details_url; // Webhooks/REST only. - optional check_suite; // Webhooks/REST only. + explicit + gh_check_run (json::parser&); + + gh_check_run () = default; + }; + + struct gh_check_run_ex: gh_check_run + { + string details_url; + gh_check_suite check_suite; - // If the second argument is true then we're parsing a webhook event or - // REST API response in which case we expect a few more fields to be - // present than in a GraphQL response. - // explicit - gh_check_run (json::parser&, bool webhook_or_rest = false); + gh_check_run (json::parser&); gh_check_run () = default; }; @@ -164,7 +168,7 @@ namespace brep struct gh_check_run_event { string action; - gh_check_run check_run; + gh_check_run_ex check_run; gh_repository repository; gh_installation installation; -- cgit v1.1