From f14212d90b90f3e8cbebb1e43b294228819f8792 Mon Sep 17 00:00:00 2001 From: Francois Kritzinger Date: Tue, 28 May 2024 13:24:30 +0200 Subject: Post-review changes --- mod/mod-ci-github-service-data.cxx | 45 +++++++++++++++++++++++++++++++++++--- 1 file changed, 42 insertions(+), 3 deletions(-) (limited to 'mod/mod-ci-github-service-data.cxx') diff --git a/mod/mod-ci-github-service-data.cxx b/mod/mod-ci-github-service-data.cxx index 8c6970c..7fd554d 100644 --- a/mod/mod-ci-github-service-data.cxx +++ b/mod/mod-ci-github-service-data.cxx @@ -43,12 +43,18 @@ namespace brep { string* s (p.next_expect_member_string_null ("repository_clone_url")); - if (s) + if (s != nullptr) repository_clone_url = *s; } pr_number = p.next_expect_member_number_null ("pr_number"); + { + string* s (p.next_expect_member_string_null ("merge_node_id")); + if (s != nullptr) + merge_node_id = *s; + } + head_sha = p.next_expect_member_string ("head_sha"); p.next_expect_member_array ("check_runs"); @@ -72,6 +78,12 @@ namespace brep p.next_expect (event::end_object); } + { + string* s (p.next_expect_member_string_null ("conclusion_node_id")); + if (s != nullptr) + conclusion_node_id = *s; + } + p.next_expect (event::end_object); } @@ -81,9 +93,24 @@ namespace brep timestamp iat_ea, uint64_t iid, string rid, + string hs) + : warning_success (ws), + installation_access (move (iat_tok), iat_ea), + installation_id (iid), + repository_node_id (move (rid)), + head_sha (move (hs)) + { + } + + service_data:: + service_data (bool ws, + string iat_tok, + timestamp iat_ea, + uint64_t iid, + string rid, string hs, - optional rcu, - optional prn) + string rcu, + uint32_t prn) : warning_success (ws), installation_access (move (iat_tok), iat_ea), installation_id (iid), @@ -128,6 +155,12 @@ namespace brep else s.value (nullptr); + s.member_name ("merge_node_id"); + if (merge_node_id) + s.value (*merge_node_id); + else + s.value (nullptr); + s.member ("head_sha", head_sha); s.member_begin_array ("check_runs"); @@ -150,6 +183,12 @@ namespace brep } s.end_array (); + s.member_name ("conclusion_node_id"); + if (conclusion_node_id) + s.value (*conclusion_node_id); + else + s.value (nullptr); + s.end_object (); return b; -- cgit v1.1