From f2422282b42dedb87988dd9e86ce7bac1ecccd95 Mon Sep 17 00:00:00 2001 From: Francois Kritzinger Date: Tue, 28 May 2024 10:04:38 +0200 Subject: build_unloaded() --- mod/mod-ci-github.cxx | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) (limited to 'mod') 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 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 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 -- cgit v1.1