diff options
author | Nejc Habjan <hab.nejc@gmail.com> | 2021-02-24 00:18:49 +0100 |
---|---|---|
committer | Nejc Habjan <hab.nejc@gmail.com> | 2021-06-13 21:18:44 +0200 |
commit | 954357c49963ef51945c81c41fd4345002f9fb98 (patch) | |
tree | 13cd0da13d9a747cae56eff45fe27244f3c13a51 /gitlab/cli.py | |
parent | e3aa0238da48589d41c84e3102611eb21d032ea5 (diff) | |
download | gitlab-954357c49963ef51945c81c41fd4345002f9fb98.tar.gz |
feat(api): add MR pipeline manager in favor of pipelines() method
Diffstat (limited to 'gitlab/cli.py')
-rw-r--r-- | gitlab/cli.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gitlab/cli.py b/gitlab/cli.py index a5044ff..c053a38 100644 --- a/gitlab/cli.py +++ b/gitlab/cli.py @@ -53,6 +53,7 @@ def register_custom_action( cls_names: Union[str, Tuple[str, ...]], mandatory: Tuple[str, ...] = tuple(), optional: Tuple[str, ...] = tuple(), + custom_action: Optional[str] = None, ) -> Callable[[__F], __F]: def wrap(f: __F) -> __F: @functools.wraps(f) @@ -74,7 +75,7 @@ def register_custom_action( if final_name not in custom_actions: custom_actions[final_name] = {} - action = f.__name__.replace("_", "-") + action = custom_action or f.__name__.replace("_", "-") custom_actions[final_name][action] = (mandatory, optional, in_obj) return cast(__F, wrapped_f) |