From 65f90058ec7b1534fd93c525c9d171353737734a Mon Sep 17 00:00:00 2001 From: Francois Kritzinger Date: Thu, 6 Jun 2024 10:50:58 +0200 Subject: Cancel and create new PR CI requests on base branch update --- mod/mod-ci-github.hxx | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'mod/mod-ci-github.hxx') 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 -- cgit v1.1