aboutsummaryrefslogtreecommitdiff
path: root/mod/mod-ci-github-gq.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'mod/mod-ci-github-gq.cxx')
-rw-r--r--mod/mod-ci-github-gq.cxx19
1 files changed, 18 insertions, 1 deletions
diff --git a/mod/mod-ci-github-gq.cxx b/mod/mod-ci-github-gq.cxx
index bcf9e55..1e9af74 100644
--- a/mod/mod-ci-github-gq.cxx
+++ b/mod/mod-ci-github-gq.cxx
@@ -265,6 +265,12 @@ namespace brep
build_state rst (gh_from_status (rcr.status)); // Received state.
+ // Note that GitHub won't allow us to change a built check run to
+ // any other state (but all other transitions are allowed).
+ //
+ // @@ Are we handling the case where the resulting state (built)
+ // differs from what we expect?
+ //
if (rst != build_state::built && rst != st)
{
error << "unexpected check_run status: received '" << rcr.status
@@ -279,7 +285,7 @@ namespace brep
if (!cr.node_id)
cr.node_id = move (rcr.node_id);
- cr.state = gh_from_status (rcr.status);
+ cr.state = rst;
cr.state_synced = true;
}
}
@@ -636,6 +642,8 @@ namespace brep
; // Still being generated; leave value absent.
else
{
+ // @@ Let's throw invalid_json.
+ //
parse_error = "unexpected mergeable value '" + ma + '\'';
// Carry on as if it were UNKNOWN.
@@ -739,6 +747,15 @@ namespace brep
// }
// }
//
+ //
+ // pullRequests (last:50 states:[OPEN]
+ // orderBy:{field:UPDATED_AT direction:ASC}
+ // baseRefName:"master") {
+ //
+ // updatedAt field changes on PR close, conversion to draft PR, merge
+ // conflict resolution, etc. So seems like it changes with any kind of PR
+ // update.
+ //
static string
gq_query_fetch_open_pull_requests (const string& rid, const string& br)
{