diff options
author | Francois Kritzinger <francois@codesynthesis.com> | 2024-06-06 17:38:27 +0200 |
---|---|---|
committer | Francois Kritzinger <francois@codesynthesis.com> | 2024-10-15 09:05:28 +0200 |
commit | 6964d32fef15c3b99d40840d16bd298143002cc1 (patch) | |
tree | 3b4374d91677ccfa3ebfaacc32bf7b3b5eeaf6e6 /mod | |
parent | 4697aefcf0de2003f106fefab67af6b1132ed26c (diff) |
Handle check suite re-runs
Diffstat (limited to 'mod')
-rw-r--r-- | mod/mod-ci-github.cxx | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/mod/mod-ci-github.cxx b/mod/mod-ci-github.cxx index 82da4f0..0ddc75d 100644 --- a/mod/mod-ci-github.cxx +++ b/mod/mod-ci-github.cxx @@ -309,8 +309,6 @@ namespace brep // Someone manually requested to re-run all the check runs in this // check suite. Treat as a new request. // - // @@@ Test and make sure works? - // return handle_check_suite_request (move (cs), warning_success); } else if (cs.action == "completed") @@ -559,6 +557,15 @@ namespace brep << cs.check_suite.head_branch; } } + // Cancel existing CI request if this check suite is being re-run. + // + else if (cs.action == "rerequested") + { + const string& nid (cs.check_suite.node_id); + + if (!cancel (error, warn, &trace, *build_db_, "ci-github", nid)) + error << "check suite " << nid << " (re-requested): unable to cancel"; + } // Start CI for the check suite. // |