Skip to content

Commit 2dd84e8

Browse files
author
Gauvain Pocentek
committed
[v4] repository tree: s/ref_name/ref/
1 parent 0d1ace1 commit 2dd84e8

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

gitlab/v4/objects.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1862,12 +1862,12 @@ class Project(GitlabObject):
18621862
('variables', 'ProjectVariableManager', [('project_id', 'id')]),
18631863
)
18641864

1865-
def repository_tree(self, path='', ref_name='', **kwargs):
1865+
def repository_tree(self, path='', ref='', **kwargs):
18661866
"""Return a list of files in the repository.
18671867
18681868
Args:
18691869
path (str): Path of the top folder (/ by default)
1870-
ref_name (str): Reference to a commit or branch
1870+
ref (str): Reference to a commit or branch
18711871
18721872
Returns:
18731873
str: The json representation of the tree.
@@ -1880,8 +1880,8 @@ def repository_tree(self, path='', ref_name='', **kwargs):
18801880
params = []
18811881
if path:
18821882
params.append(urllib.urlencode({'path': path}))
1883-
if ref_name:
1884-
params.append("ref_name=%s" % ref_name)
1883+
if ref:
1884+
params.append("ref=%s" % ref)
18851885
if params:
18861886
url += '?' + "&".join(params)
18871887
r = self.gitlab._raw_get(url, **kwargs)

0 commit comments

Comments
 (0)