diff --git a/gitlab/cli.py b/gitlab/cli.py index fc4c029d0..cbd0d7c06 100644 --- a/gitlab/cli.py +++ b/gitlab/cli.py @@ -46,7 +46,8 @@ 'owned': {}, 'all': {}}, gitlab.User: {'block': {'required': ['id']}, - 'unblock': {'required': ['id']}}, + 'unblock': {'required': ['id']}, + 'search': {'required': ['query']}}, } @@ -222,6 +223,12 @@ def do_project_milestone_issues(self, cls, gl, what, args): except Exception as e: _die("Impossible to get milestone issues (%s)" % str(e)) + def do_user_search(self, cls, gl, what, args): + try: + return gl.users.search(args['query']) + except Exception as e: + _die("Impossible to search users (%s)" % str(e)) + def _populate_sub_parser_by_class(cls, sub_parser): for action_name in ['list', 'get', 'create', 'update', 'delete']: