aboutsummaryrefslogtreecommitdiff
path: root/mod/module.cli
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2024-05-26 13:46:55 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2024-05-28 13:58:46 +0300
commita7ae434c48c14bfde46a871455a3aa2ac0b81376 (patch)
tree2d4f66a2e153842e166becfcbb2a820036faffcb /mod/module.cli
parent5e631e5f63fdc8528d5d178d6a66dfb32a2c0f8b (diff)
Add CI cancel handler
Diffstat (limited to 'mod/module.cli')
-rw-r--r--mod/module.cli26
1 files changed, 21 insertions, 5 deletions
diff --git a/mod/module.cli b/mod/module.cli
index 5f63930..5133935 100644
--- a/mod/module.cli
+++ b/mod/module.cli
@@ -796,10 +796,6 @@ namespace brep
}
};
- class ci_cancel
- {
- };
-
class ci: ci_start, build, build_db, page, repository_url, handler
{
// Classic CI-specific options.
@@ -815,7 +811,11 @@ namespace brep
}
};
- class ci_github: ci_start, ci_cancel, build, build_db, handler
+ class ci_cancel: build, build_db, handler
+ {
+ };
+
+ class ci_github: ci_start, build, build_db, handler
{
// GitHub CI-specific options (e.g., request timeout when invoking
// GitHub APIs).
@@ -1099,6 +1099,22 @@ namespace brep
string simulate;
};
+ // All parameters are non-optional.
+ //
+ class ci_cancel
+ {
+ // CI task tenant id.
+ //
+ // Note that the ci-cancel parameter is renamed to '_' by the root
+ // handler (see the request_proxy class for details).
+ //
+ string id | _;
+
+ // CI task canceling reason. Must not be empty.
+ //
+ string reason;
+ };
+
// Parameters other than challenge must be all present.
//
// Note also that besides these parameters there can be others. We don't