diff options
author | Francois Kritzinger <francois@codesynthesis.com> | 2024-12-17 15:34:05 +0200 |
---|---|---|
committer | Francois Kritzinger <francois@codesynthesis.com> | 2024-12-17 15:48:00 +0200 |
commit | 747377fbb9684bd2f5811b080bfbde1fedc59b6c (patch) | |
tree | 9cce3eb5d40a58c4a612535f960ffe7df4a9f5e4 /mod/mod-ci-github.hxx | |
parent | 09770fb24073041464f1298b4833c51f028f062d (diff) |
Cancel CI of the previous head commit in the case of overwritten or deleted
history.
In the process, move branch push handling from handle_check_suite_request() to
handle_branch_push() because GitHub sends a push event instead of a
check_suite when a new branch is created so tenant reference counting would
not work otherwise.
Diffstat (limited to 'mod/mod-ci-github.hxx')
-rw-r--r-- | mod/mod-ci-github.hxx | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/mod/mod-ci-github.hxx b/mod/mod-ci-github.hxx index 059801a..4f69f5c 100644 --- a/mod/mod-ci-github.hxx +++ b/mod/mod-ci-github.hxx @@ -82,13 +82,15 @@ namespace brep virtual void init (cli::scanner&); - // Handle the check_suite event `requested` and `rerequested` actions. + // @@ TODO Reorder handlers: push, pull_request, then check_suite. + + // Handle the check_suite event `rerequested` action. // // If warning_success is true, then map result_status::warning to SUCCESS // and to FAILURE otherwise. // bool - handle_check_suite_request (gh_check_suite_event, bool warning_success); + handle_check_suite_rerequest (gh_check_suite_event, bool warning_success); // Handle the check_suite event `completed` action. // @@ -114,6 +116,14 @@ namespace brep bool handle_pull_request (gh_pull_request_event, bool warning_success); + // Handle push events (branch push). + // + // If warning_success is true, then map result_status::warning to SUCCESS + // and to FAILURE otherwise. + // + bool + handle_branch_push (gh_push_event, bool warning_success); + // Build a check run details_url for a build. // string |