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-06-06 11:11:39 +0200
commit65f90058ec7b1534fd93c525c9d171353737734a (patch)
treee2cb6054639d0846796c66e8a02e7b070e40241b /mod/mod-ci-github.hxx
parent1398404033c24cb6c482c9547d5ef287143ae44f (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