aboutsummaryrefslogtreecommitdiff
path: root/mod/mod-ci-github-gq.cxx
diff options
context:
space:
mode:
authorFrancois Kritzinger <francois@codesynthesis.com>2024-06-04 14:29:27 +0200
committerFrancois Kritzinger <francois@codesynthesis.com>2024-10-15 09:05:28 +0200
commit8aee1c959b53ff300a9548615c44b51c960e1392 (patch)
treee683aed41c08320f69b2956ebe4bc56a2622b099 /mod/mod-ci-github-gq.cxx
parent49525cd3f771aa1228f40309c43f9fab462c81d9 (diff)
Fix GraphQL response parsing
Diffstat (limited to 'mod/mod-ci-github-gq.cxx')
-rw-r--r--mod/mod-ci-github-gq.cxx24
1 files changed, 16 insertions, 8 deletions
diff --git a/mod/mod-ci-github-gq.cxx b/mod/mod-ci-github-gq.cxx
index e5ea0c5..5979511 100644
--- a/mod/mod-ci-github-gq.cxx
+++ b/mod/mod-ci-github-gq.cxx
@@ -114,10 +114,12 @@ namespace brep
}
else if (p.name () == "errors")
{
- // Don't stop parsing because the error semantics depends on whether
- // or not `data` is present.
+ // Skip the errors object but don't stop parsing because the error
+ // semantics depends on whether or not `data` is present.
//
err = true; // Handled below.
+
+ p.next_expect_value_skip ();
}
else
{
@@ -622,13 +624,19 @@ namespace brep
value = move (oid);
}
- else if (ma == "CONFLICTING")
- {
- value = "";
- }
- else if (ma == "UNKNOWN")
+ else
{
- // Still being generated; leave value absent.
+ if (ma == "CONFLICTING")
+ value = "";
+ else if (ma == "UNKNOWN")
+ {
+ // Still being generated; leave value absent.
+ }
+
+ // Skip the merge commit ID (which should be null).
+ //
+ p.next_expect_name ("potentialMergeCommit");
+ p.next_expect_value_skip ();
}
p.next_expect (event::end_object); // node