aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrancois Kritzinger <francois@codesynthesis.com>2024-11-18 10:36:35 +0200
committerFrancois Kritzinger <francois@codesynthesis.com>2024-11-18 10:36:35 +0200
commitb07d12f6cd5dd41d67415e62e6472bfcec2773e9 (patch)
treee394ce1c921045b04760d162a9911f23361dce80
parente142ce121abc666dfba0dab686f54850934443a1 (diff)
Get it compiling again
-rw-r--r--mod/ci-common.cxx4
-rw-r--r--mod/mod-ci-github.cxx7
-rw-r--r--mod/mod-ci-github.hxx2
3 files changed, 8 insertions, 5 deletions
diff --git a/mod/ci-common.cxx b/mod/ci-common.cxx
index d750b1b..4b9f9f9 100644
--- a/mod/ci-common.cxx
+++ b/mod/ci-common.cxx
@@ -1007,9 +1007,9 @@ namespace brep
tr.commit ();
- if (t == nullptr)
+ if (t == nullptr || !t->service)
return nullopt;
- return pair<tenant_service, bool> (move (t->service), t->archived);
+ return pair<tenant_service, bool> (move (*t->service), t->archived);
}
}
diff --git a/mod/mod-ci-github.cxx b/mod/mod-ci-github.cxx
index b5935d2..f9f33a8 100644
--- a/mod/mod-ci-github.cxx
+++ b/mod/mod-ci-github.cxx
@@ -541,11 +541,14 @@ namespace brep
{
kind = service_data::remote;
- if (optional<tenant_service> ts = find (*build_db_, "ci-github", sid))
+ if (optional<pair<tenant_service, bool>> p =
+ find (*build_db_, "ci-github", sid))
{
+ tenant_service& ts (p->first);
+
try
{
- service_data sd (*ts->data);
+ service_data sd (*ts.data);
check_sha = move (sd.check_sha); // Test merge commit.
}
catch (const invalid_argument& e)
diff --git a/mod/mod-ci-github.hxx b/mod/mod-ci-github.hxx
index aa601d2..b88d5e4 100644
--- a/mod/mod-ci-github.hxx
+++ b/mod/mod-ci-github.hxx
@@ -89,7 +89,7 @@ namespace brep
// and to FAILURE otherwise.
//
bool
- handle_check_run_rerequest (gh_check_run_event, bool warning_success);
+ handle_check_run_rerequest (const gh_check_run_event&, bool warning_success);
// Handle the pull_request event `opened` and `synchronize` actions.
//