aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrancois Kritzinger <francois@codesynthesis.com>2024-06-06 17:38:27 +0200
committerFrancois Kritzinger <francois@codesynthesis.com>2024-06-07 08:06:30 +0200
commitcbe3a565001efe2324b65f52bded710bab4da26d (patch)
tree9b0590d38b49c53e65e5b75a2d098fb186f51399
parent30117c08e2dfac32a5c5de5c32d62700cd0d7f4a (diff)
Handle check suite re-runs
-rw-r--r--mod/mod-ci-github.cxx11
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.
//