aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrancois Kritzinger <francois@codesynthesis.com>2024-05-28 10:04:38 +0200
committerFrancois Kritzinger <francois@codesynthesis.com>2024-06-05 09:12:46 +0200
commit0d5dc827745a0d80cf957863629f17282f82bb48 (patch)
tree8dd86d458b18a3d8494a25af6f9145d758d3d28d
parent9d0e65dcf51ac2f7baaf93c277fb2428cb0eb6f2 (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