Skip to content

Commit

Permalink
Implement "user search" CLI
Browse files Browse the repository at this point in the history
  • Loading branch information
Gauvain Pocentek committed Feb 12, 2016
1 parent 6975ac6 commit 073d8d5
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion gitlab/cli.py
Expand Up @@ -46,7 +46,8 @@
'owned': {},
'all': {}},
gitlab.User: {'block': {'required': ['id']},
'unblock': {'required': ['id']}},
'unblock': {'required': ['id']},
'search': {'required': ['query']}},
}


Expand Down Expand Up @@ -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']:
Expand Down

0 comments on commit 073d8d5

Please sign in to comment.