aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrancois Kritzinger <francois@codesynthesis.com>2024-05-28 10:04:38 +0200
committerFrancois Kritzinger <francois@codesynthesis.com>2024-10-15 09:05:28 +0200
commitf2422282b42dedb87988dd9e86ce7bac1ecccd95 (patch)
treef4f7f5f10d6f9b8de9c92767530e6b988ec48291
parent22d1c16a61c0906301d38bd5a34115f2160b0d4a (diff)
build_unloaded()
-rw-r--r--mod/mod-ci-github.cxx30
1 files changed, 17 insertions, 13 deletions
diff --git a/mod/mod-ci-github.cxx b/mod/mod-ci-github.cxx
index 573c1a1..f1d6be9 100644
--- a/mod/mod-ci-github.cxx
+++ b/mod/mod-ci-github.cxx
@@ -769,8 +769,9 @@ namespace brep
// Create the conclusion check run if the merge commit shows the PR is
// mergeable.
//
- // @@ TMP We could do this later if we prefer: the PR will not go green
- // until the conclusion check run is successful.
+ // @@ TMP We could do this later if we prefer: if the branch protection
+ // rule requires the conclusion check run then the PR will not go
+ // green until the conclusion check run is successful.
//
ccr = check_run ();
ccr->build_id = "conclusion";
@@ -791,17 +792,20 @@ namespace brep
// Load the CI request.
//
- // repository_location rl (pr.repository.clone_url + '#' +
- // sd.head_branch,
- // repository_type::git);
-
- // optional<start_result> sr (
- // load (error,
- // warn,
- // trace,
- // *build_db_,
- // move (ts)
- // const repository_location& repository));
+ repository_location rl (*sd.repository_clone_url + "#refs/pull/" +
+ to_string (*sd.pr_number) + "/merge",
+ repository_type::git);
+
+ optional<start_result> r (
+ load (error, warn, &trace, *build_db_, move (ts), rl));
+
+ if (!r)
+ {
+ error << "unable to load CI request";
+
+ // @@ TODO Handle this. Will get called again and in those cases do
+ // nothing except load the CI request.
+ }
}
return