@@ -2403,12 +2403,13 @@ class Project(SaveMixin, ObjectDeleteMixin, RESTObject):
2403
2403
2404
2404
@cli .register_custom_action ('Project' ,tuple (), ('path' ,'ref' ))
2405
2405
@exc .on_http_error (exc .GitlabGetError )
2406
- def repository_tree (self ,path = '' ,ref = '' ,** kwargs ):
2406
+ def repository_tree (self ,path = '' ,ref = '' ,recursive = False , ** kwargs ):
2407
2407
"""Return a list of files in the repository.
2408
2408
2409
2409
Args:
2410
2410
path (str): Path of the top folder (/ by default)
2411
2411
ref (str): Reference to a commit or branch
2412
+ recursive (bool): Whether to get the tree recursively
2412
2413
all (bool): If True, return all the items, without pagination
2413
2414
per_page (int): Number of items to retrieve per request
2414
2415
page (int): ID of the page to return (starts with page 1)
@@ -2424,7 +2425,7 @@ def repository_tree(self, path='', ref='', **kwargs):
2424
2425
list: The representation of the tree
2425
2426
"""
2426
2427
gl_path = '/projects/%s/repository/tree' % self .get_id ()
2427
- query_data = {}
2428
+ query_data = {'recursive' : recursive }
2428
2429
if path :
2429
2430
query_data ['path' ]= path
2430
2431
if ref :