diff options
author | Francois Kritzinger <francois@codesynthesis.com> | 2024-04-22 14:26:00 +0200 |
---|---|---|
committer | Francois Kritzinger <francois@codesynthesis.com> | 2024-06-05 09:12:46 +0200 |
commit | ae87fa810c8c5defb2c0ff9bc9943d81dbf9fa8c (patch) | |
tree | c649a01af77f8b8d5d9326c5cd057cfca647c1ce /mod/mod-ci-github-service-data.cxx | |
parent | 2aaf7e3dc591b2ccf50c1709d1287338c541f8da (diff) |
Add service data flag state_synced
Diffstat (limited to 'mod/mod-ci-github-service-data.cxx')
-rw-r--r-- | mod/mod-ci-github-service-data.cxx | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/mod/mod-ci-github-service-data.cxx b/mod/mod-ci-github-service-data.cxx index e519936..f79550c 100644 --- a/mod/mod-ci-github-service-data.cxx +++ b/mod/mod-ci-github-service-data.cxx @@ -51,14 +51,10 @@ namespace brep nid = *v; } - optional<build_state> s; - { - string* v (p.next_expect_member_string_null ("state")); - if (v != nullptr) - s = to_build_state (*v); - } + build_state s (to_build_state (p.next_expect_member_string ("state"))); + bool ss (p.next_expect_member_boolean<bool> ("state_synced")); - check_runs.emplace_back (move (bid), move (nid), s); + check_runs.emplace_back (move (bid), move (nid), s, ss); p.next_expect (event::end_object); } @@ -112,11 +108,8 @@ namespace brep else s.value (nullptr); - s.member_name ("state"); - if (cr.state) - s.value (to_string (*cr.state)); - else - s.value (nullptr); + s.member ("state", to_string (cr.state)); + s.member ("state_synced", cr.state_synced); s.end_object (); } @@ -143,7 +136,7 @@ namespace brep { os << "node_id: " << cr.node_id.value_or ("null") << ", build_id: " << cr.build_id - << ", state: " << (cr.state ? to_string (*cr.state) : "null"); + << ", state: " << cr.state_string (); return os; } |