aboutsummaryrefslogtreecommitdiff
path: root/mod
diff options
context:
space:
mode:
authorFrancois Kritzinger <francois@codesynthesis.com>2024-06-04 14:29:27 +0200
committerFrancois Kritzinger <francois@codesynthesis.com>2024-06-06 10:51:35 +0200
commitc1a6bac9df34cc7c37f85621d804de5564b59fe9 (patch)
treed9a56660dd9cab493174ac3ee0269cc1b76cbe63 /mod
parentf71b1c6b58ba38dc391c03c3c2350344789c0791 (diff)
Fix GraphQL response parsing
Diffstat (limited to 'mod')
-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