diff options
author | Francois Kritzinger <francois@codesynthesis.com> | 2024-10-23 11:53:28 +0200 |
---|---|---|
committer | Francois Kritzinger <francois@codesynthesis.com> | 2024-12-10 16:34:15 +0200 |
commit | e5e3c528e64c09e5493e821f700c959560432678 (patch) | |
tree | ac6376eaea5a3375620682355d879c10049ec053 /mod/mod-ci-github-service-data.hxx | |
parent | 86e549e50d8e77a01f701940979a631eec1d82c5 (diff) |
handle_pull_request(): Create pre-check CI request
Diffstat (limited to 'mod/mod-ci-github-service-data.hxx')
-rw-r--r-- | mod/mod-ci-github-service-data.hxx | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/mod/mod-ci-github-service-data.hxx b/mod/mod-ci-github-service-data.hxx index 462e7f7..a6cb742 100644 --- a/mod/mod-ci-github-service-data.hxx +++ b/mod/mod-ci-github-service-data.hxx @@ -11,6 +11,8 @@ namespace brep { + // @@@ Check is any data members are unused. + // Service data associated with the tenant (corresponds to GH check suite). // // It is always a top-level JSON object and the first member is always the @@ -44,8 +46,7 @@ namespace brep }; // We have two kinds of service data that correspond to the following two - // scenarios (those are the only possible ones, until/unless we add support - // for merge queues): + // typical scenarios (until/unless we add support for merge queues): // // 1. Branch push (via check_suite) plus zero or more local PRs (via // pull_request) that share the same head commit id. @@ -58,6 +59,13 @@ namespace brep // can be created and is not behind base. We do all this before we actually // create the CI tenant. // + // Note that the above two cases are typical but not the only possible + // scenarios. Specifically, it is possible to have a mixture of all three + // kinds (branch push, local PR, and remote PR) since the same head commit + // id can be present in both local and remote branches. There is no way to + // handle this case perfectly and we do the best we can (see + // build_unloaded_pre_check() for details). + // struct service_data { // The data schema version. Note: must be first member in the object. @@ -66,6 +74,8 @@ namespace brep // Kind and phase. // + // @@ TODO Serialize these fields. + // enum {local, remote /*, queue */} kind; bool pre_check; bool re_request; // Re-requested (rebuild). @@ -129,12 +139,15 @@ namespace brep // The check_suite constructor. // + // Note that check_sha and report_sha are both the SHA of the + // check_suite's head commit. + // service_data (bool warning_success, string iat_token, timestamp iat_expires_at, uint64_t installation_id, string repository_node_id, - string report_sha, + string head_sha, bool re_request); // The pull_request constructor. |