aboutsummaryrefslogtreecommitdiff
path: root/mod/mod-ci-github.hxx
diff options
context:
space:
mode:
authorFrancois Kritzinger <francois@codesynthesis.com>2024-06-06 10:50:58 +0200
committerFrancois Kritzinger <francois@codesynthesis.com>2024-10-15 09:05:28 +0200
commit1011d1bd0acadd7e8267137ceb4e3b9af866f157 (patch)
tree7fbd92d19418dfa7d6785cd323a6ed22a0a7e8a7 /mod/mod-ci-github.hxx
parent621ea867391ebd66d02dc57c6fd7c6ebf617bac0 (diff)
Cancel and create new PR CI requests on base branch update
Diffstat (limited to 'mod/mod-ci-github.hxx')
-rw-r--r--mod/mod-ci-github.hxx19
1 files changed, 19 insertions, 0 deletions
diff --git a/mod/mod-ci-github.hxx b/mod/mod-ci-github.hxx
index 8cd085d..07295f2 100644
--- a/mod/mod-ci-github.hxx
+++ b/mod/mod-ci-github.hxx
@@ -79,6 +79,25 @@ namespace brep
bool
handle_pull_request (gh_pull_request_event, bool warning_success);
+ // Create an unloaded CI request for a pull request. If `cancel_first` is
+ // true, cancel its existing CI request first.
+ //
+ // Return true if an unloaded CI request was created. Ignore failure to
+ // cancel because the CI request may already have been cancelled for a
+ // legitimate reason.
+ //
+ // After this call we will start getting the build_unloaded()
+ // notifications until (1) we load the request, (2) we cancel it, or (3)
+ // it gets archived after some timeout.
+ //
+ bool
+ create_pull_request_ci (const basic_mark& error,
+ const basic_mark& warn,
+ const basic_mark& trace,
+ string service_data,
+ const string& pull_request_node_id,
+ bool cancel_first) const;
+
// Build a check run details_url for a build.
//
string