@@ -2403,12 +2403,13 @@ class Project(SaveMixin, ObjectDeleteMixin, RESTObject):
24032403
24042404@cli .register_custom_action ('Project' ,tuple (), ('path' ,'ref' ))
24052405@exc .on_http_error (exc .GitlabGetError )
2406- def repository_tree (self ,path = '' ,ref = '' ,** kwargs ):
2406+ def repository_tree (self ,path = '' ,ref = '' ,recursive = False , ** kwargs ):
24072407"""Return a list of files in the repository.
24082408
24092409 Args:
24102410 path (str): Path of the top folder (/ by default)
24112411 ref (str): Reference to a commit or branch
2412+ recursive (bool): Whether to get the tree recursively
24122413 all (bool): If True, return all the items, without pagination
24132414 per_page (int): Number of items to retrieve per request
24142415 page (int): ID of the page to return (starts with page 1)
@@ -2424,7 +2425,7 @@ def repository_tree(self, path='', ref='', **kwargs):
24242425 list: The representation of the tree
24252426 """
24262427gl_path = '/projects/%s/repository/tree' % self .get_id ()
2427- query_data = {}
2428+ query_data = {'recursive' : recursive }
24282429if path :
24292430query_data ['path' ]= path
24302431if ref :