Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion atlassian/bitbucket/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2166,20 +2166,23 @@ def create_code_insights_report(
data.update(report_params)
return self.put(url, data=data)

def get_file_list(self, project_key, repository_slug, query=None, start=0, limit=None):
def get_file_list(self, project_key, repository_slug, sub_folder=None, query=None, start=0, limit=None):
"""
Retrieve a page of files from particular directory of a repository.
The search is done recursively, so all files from any sub-directory of the specified directory will be returned.
The authenticated user must have REPO_READ permission for the specified repository to call this resource.
:param start:
:param project_key:
:param repository_slug:
:param sub_folder: a sub folder in the target repository to list the files from.
:param query: the commit ID or ref (e.g. a branch or tag) to list the files at.
If not specified the default branch will be used instead.
:param limit: OPTIONAL
:return:
"""
url = "{}/files".format(self._url_repo(project_key, repository_slug))
if sub_folder:
url = "{}/{}".format(url, sub_folder)
params = {}
if query:
params["at"] = query
Expand Down