aboutsummaryrefslogtreecommitdiff
path: root/mod
diff options
context:
space:
mode:
authorFrancois Kritzinger <francois@codesynthesis.com>2024-04-24 10:00:08 +0200
committerFrancois Kritzinger <francois@codesynthesis.com>2024-10-15 09:05:28 +0200
commit8576cbed127d53432ac20144d70ae7a7de4f4e74 (patch)
treedb0ff494d48a99191a04078d50e31f9711d76083 /mod
parentc16410d19ea96e82a8adb164635411df54a8be53 (diff)
Don't pass build hints to build_building() or build_built()
Diffstat (limited to 'mod')
-rw-r--r--mod/mod-ci-github-gh.cxx3
-rw-r--r--mod/mod-ci-github-gh.hxx5
-rw-r--r--mod/mod-ci-github-gq.cxx6
-rw-r--r--mod/mod-ci-github-gq.hxx4
-rw-r--r--mod/mod-ci-github.cxx6
-rw-r--r--mod/mod-ci-github.hxx4
6 files changed, 11 insertions, 17 deletions
diff --git a/mod/mod-ci-github-gh.cxx b/mod/mod-ci-github-gh.cxx
index 4e5ae9b..298d21f 100644
--- a/mod/mod-ci-github-gh.cxx
+++ b/mod/mod-ci-github-gh.cxx
@@ -40,8 +40,7 @@ namespace brep
}
string
- gh_check_run_name (const build& b,
- const tenant_service_base::build_hints* bh)
+ gh_check_run_name (const build& b, const build_queued_hints* bh)
{
string r;
diff --git a/mod/mod-ci-github-gh.hxx b/mod/mod-ci-github-gh.hxx
index 0e4cf4e..7d10a15 100644
--- a/mod/mod-ci-github-gh.hxx
+++ b/mod/mod-ci-github-gh.hxx
@@ -21,6 +21,8 @@ namespace butl
namespace brep
{
+ using build_queued_hints = tenant_service_build_queued::build_queued_hints;
+
// GitHub request/response types (all start with gh_).
//
// Note that the GitHub REST and GraphQL APIs use different ID types and
@@ -83,8 +85,7 @@ namespace brep
// NULL, return an abbreviated id if possible.
//
string
- gh_check_run_name (const build&,
- const tenant_service_base::build_hints* = nullptr);
+ gh_check_run_name (const build&, const build_queued_hints* = nullptr);
struct gh_repository
{
diff --git a/mod/mod-ci-github-gq.cxx b/mod/mod-ci-github-gq.cxx
index 0b70e47..4a84f2b 100644
--- a/mod/mod-ci-github-gq.cxx
+++ b/mod/mod-ci-github-gq.cxx
@@ -323,7 +323,7 @@ namespace brep
const string& hs, // Head SHA
const vector<reference_wrapper<const build>>& bs,
build_state st,
- const tenant_service_base::build_hints* bh)
+ const build_queued_hints* bh)
{
ostringstream os;
@@ -399,7 +399,7 @@ namespace brep
const string& hs,
const vector<reference_wrapper<const build>>& bs,
build_state st,
- const tenant_service_base::build_hints& bh,
+ const build_queued_hints& bh,
const basic_mark& error)
{
string rq (gq_serialize_request (
@@ -415,7 +415,7 @@ namespace brep
const string& hs,
const build& b,
build_state st,
- const tenant_service_base::build_hints& bh,
+ const build_queued_hints& bh,
const basic_mark& error)
{
vector<check_run> crs {move (cr)};
diff --git a/mod/mod-ci-github-gq.hxx b/mod/mod-ci-github-gq.hxx
index 87ba49b..3d8c6cc 100644
--- a/mod/mod-ci-github-gq.hxx
+++ b/mod/mod-ci-github-gq.hxx
@@ -30,7 +30,7 @@ namespace brep
const string& head_sha,
const vector<reference_wrapper<const build>>&,
build_state,
- const tenant_service_base::build_hints&,
+ const build_queued_hints&,
const basic_mark& error);
// Create a new check run on GitHub for a build. Update `cr` with the new
@@ -44,7 +44,7 @@ namespace brep
const string& head_sha,
const build&,
build_state,
- const tenant_service_base::build_hints&,
+ const build_queued_hints&,
const basic_mark& error);
// Update a check run on GitHub.
diff --git a/mod/mod-ci-github.cxx b/mod/mod-ci-github.cxx
index f4de8d4..c11b162 100644
--- a/mod/mod-ci-github.cxx
+++ b/mod/mod-ci-github.cxx
@@ -447,7 +447,7 @@ namespace brep
build_queued (const tenant_service& ts,
const vector<build>& builds,
optional<build_state> istate,
- const build_hints& hs,
+ const build_queued_hints& hs,
const diag_epilogue& log_writer) const noexcept
{
NOTIFICATION_DIAG (log_writer);
@@ -595,11 +595,8 @@ namespace brep
};
}
- // @@ TODO Are hints still required? And for built?
- //
function<optional<string> (const tenant_service&)> ci_github::
build_building (const tenant_service& ts, const build& b,
- const build_hints&,
const diag_epilogue& log_writer) const noexcept
{
// Note that we may receive this notification before the corresponding
@@ -809,7 +806,6 @@ namespace brep
function<optional<string> (const tenant_service&)> ci_github::
build_built (const tenant_service&, const build&,
- const build_hints&,
const diag_epilogue& /* log_writer */) const noexcept
{
return nullptr;
diff --git a/mod/mod-ci-github.hxx b/mod/mod-ci-github.hxx
index 4b23d85..07feca8 100644
--- a/mod/mod-ci-github.hxx
+++ b/mod/mod-ci-github.hxx
@@ -43,17 +43,15 @@ namespace brep
build_queued (const tenant_service&,
const vector<build>&,
optional<build_state> initial_state,
- const build_hints&,
+ const build_queued_hints&,
const diag_epilogue& log_writer) const noexcept override;
virtual function<optional<string> (const tenant_service&)>
build_building (const tenant_service&, const build&,
- const build_hints&,
const diag_epilogue& log_writer) const noexcept override;
virtual function<optional<string> (const tenant_service&)>
build_built (const tenant_service&, const build&,
- const build_hints&,
const diag_epilogue& log_writer) const noexcept override;
private: