aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2024-11-05 11:45:01 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2024-11-05 11:45:01 +0200
commit64d93803d18f9137179293bbee1364ee2022ebb6 (patch)
tree3b205f623e8dfdb411b0190c8d077c1cc61657e3
parentfe0957fdd6563e5be02d723b6cb35f70e7ec4b3f (diff)
Review
-rw-r--r--mod/mod-ci-github-gh.hxx20
1 files 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<string> details_url; // Webhooks/REST only.
- optional<gh_check_suite> 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;