From 7728e2469fdf49307231d57a9fc5a2cf60aa535a Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 24 Oct 2024 13:55:07 +0200 Subject: Review --- mod/mod-ci-github-gh.hxx | 10 ++++++---- mod/mod-ci-github-service-data.hxx | 4 +++- mod/mod-ci-github.cxx | 11 +++++------ 3 files changed, 14 insertions(+), 11 deletions(-) diff --git a/mod/mod-ci-github-gh.hxx b/mod/mod-ci-github-gh.hxx index 48564b0..001353d 100644 --- a/mod/mod-ci-github-gh.hxx +++ b/mod/mod-ci-github-gh.hxx @@ -21,6 +21,8 @@ namespace butl namespace brep { + // @@@ Check if any data members are unused (once the dust settles). + using build_queued_hints = tenant_service_build_queued::build_queued_hints; // GitHub request/response types (all start with gh_). @@ -81,11 +83,11 @@ namespace brep optional mergeable; string merge_commit_sha; - string base_fullname; - string base_ref; // @@ TODO Remove if remains unused. - string base_sha; // @@ TODO Remove if remains unused. + string base_path; // Repository path (/) under github.com. + string base_ref; // @@ TODO Remove if remains unused. + string base_sha; // @@ TODO Remove if remains unused. - string head_fullname; + string head_path; string head_ref; // @@ TODO Remove if remains unused. string head_sha; diff --git a/mod/mod-ci-github-service-data.hxx b/mod/mod-ci-github-service-data.hxx index e816c21..15f8c94 100644 --- a/mod/mod-ci-github-service-data.hxx +++ b/mod/mod-ci-github-service-data.hxx @@ -11,6 +11,8 @@ namespace brep { + // @@@ Check if any data members are unused (once the dust settles). + // 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 @@ -74,7 +76,7 @@ namespace brep // // @@ TODO Serialize these fields. // - enum kind {local, remote /*, queue */} kind; + enum kind_type {local, remote /*, queue */} kind; bool pre_check; bool re_request; // Re-requested (rebuild). diff --git a/mod/mod-ci-github.cxx b/mod/mod-ci-github.cxx index 5c9bdc4..c1c31ae 100644 --- a/mod/mod-ci-github.cxx +++ b/mod/mod-ci-github.cxx @@ -704,13 +704,12 @@ namespace brep // // Distinguish between local and remote PRs by comparing the head and base - // repositories' full names (which look like - // /). + // repositories' paths. // - enum service_data::kind kind (pr.pull_request.head_fullname == - pr.pull_request.base_fullname - ? service_data::local - : service_data::remote); + enum service_data::kind kind ( + pr.pull_request.head_path == pr.pull_request.base_path + ? service_data::local + : service_data::remote); // Note that check_sha will be set later, in build_unloaded_pre_check(). // -- cgit v1.1