diff options
author | Francois Kritzinger <francois@codesynthesis.com> | 2024-10-24 09:25:59 +0200 |
---|---|---|
committer | Francois Kritzinger <francois@codesynthesis.com> | 2024-12-10 16:34:15 +0200 |
commit | 656b96fde2f28d4e6866180174c4e8481a358624 (patch) | |
tree | 8d2bece19568909dd0d0d89099250136e949d2ae /mod/ci-common.cxx | |
parent | 630834173bba497c9f21eb0459ba5cb7264346ee (diff) |
Handle check suite rebuilds (all checks) on a commit and/or PR
Diffstat (limited to 'mod/ci-common.cxx')
-rw-r--r-- | mod/ci-common.cxx | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/mod/ci-common.cxx b/mod/ci-common.cxx index 11d55af..5b039ef 100644 --- a/mod/ci-common.cxx +++ b/mod/ci-common.cxx @@ -856,4 +856,30 @@ namespace brep return s; } + + optional<tenant_service> ci_start:: + find (odb::core::database& db, + const string& type, + const string& id) const + { + using namespace odb::core; + + assert (!transaction::has_current ()); + + transaction tr (db.begin ()); + + using query = query<build_tenant>; + + shared_ptr<build_tenant> t ( + db.query_one<build_tenant> (query::service.id == id && + query::service.type == type)); + + tr.commit (); + + optional<tenant_service> r; + if (t != nullptr) + r = move (t->service); + + return r; + } } |