aboutsummaryrefslogtreecommitdiff
path: root/mod/mod-ci-github-service-data.cxx
diff options
context:
space:
mode:
authorFrancois Kritzinger <francois@codesynthesis.com>2024-12-10 16:19:52 +0200
committerFrancois Kritzinger <francois@codesynthesis.com>2024-12-10 16:32:40 +0200
commitd716c64e4501a741ac40b0c2fd0303534a7d7f05 (patch)
tree076dfa192c65a84b2272579a40fb8a564f74e583 /mod/mod-ci-github-service-data.cxx
parentc7cb981910fd97128ca5e3f7aa77355a18a56738 (diff)
Handle built notification
Diffstat (limited to 'mod/mod-ci-github-service-data.cxx')
-rw-r--r--mod/mod-ci-github-service-data.cxx15
1 files changed, 12 insertions, 3 deletions
diff --git a/mod/mod-ci-github-service-data.cxx b/mod/mod-ci-github-service-data.cxx
index ff2af5d..6aee2d7 100644
--- a/mod/mod-ci-github-service-data.cxx
+++ b/mod/mod-ci-github-service-data.cxx
@@ -26,6 +26,8 @@ namespace brep
to_string (version));
}
+ warning_success = p.next_expect_member_boolean<bool> ("warning_success");
+
// Installation access token.
//
p.next_expect_name ("installation_access");
@@ -40,6 +42,7 @@ namespace brep
while (p.next_expect (event::begin_object, event::end_array))
{
string bid (p.next_expect_member_string ("build_id"));
+ string nm (p.next_expect_member_string ("name"));
optional<string> nid;
{
@@ -51,7 +54,7 @@ namespace brep
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, ss);
+ check_runs.emplace_back (move (bid), move (nm), move (nid), s, ss);
p.next_expect (event::end_object);
}
@@ -60,12 +63,14 @@ namespace brep
}
service_data::
- service_data (string iat_tok,
+ service_data (bool ws,
+ string iat_tok,
timestamp iat_ea,
uint64_t iid,
string rid,
string hs)
- : installation_access (move (iat_tok), iat_ea),
+ : warning_success (ws),
+ installation_access (move (iat_tok), iat_ea),
installation_id (iid),
repository_node_id (move (rid)),
head_sha (move (hs))
@@ -82,6 +87,8 @@ namespace brep
s.member ("version", 1);
+ s.member ("warning_success", warning_success);
+
// Installation access token.
//
s.member_begin_object ("installation_access");
@@ -98,6 +105,7 @@ namespace brep
{
s.begin_object ();
s.member ("build_id", cr.build_id);
+ s.member ("name", cr.name);
s.member_name ("node_id");
if (cr.node_id)
@@ -133,6 +141,7 @@ namespace brep
{
os << "node_id: " << cr.node_id.value_or ("null")
<< ", build_id: " << cr.build_id
+ << ", name: " << cr.name
<< ", state: " << cr.state_string ();
return os;