From 24415b406a6457638fc4e5435bab9fed987d01ba Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Fri, 7 Jun 2024 10:17:30 +0200 Subject: Plan and prepare for upcoming restructuring --- mod/mod-ci-github-gq.cxx | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'mod/mod-ci-github-gq.cxx') 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) { -- cgit v1.1