Skip to content

Commit b2ec6c2

Browse files
author
Dale Myers
committed
Add ability to set path for zip download
1 parent 7df50f5 commit b2ec6c2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

simple_ado/git.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,7 @@ def download_zip(
241241
self,
242242
*,
243243
branch: str,
244+
path: str = "/",
244245
output_path: str,
245246
project_id: str,
246247
repository_id: str,
@@ -249,6 +250,7 @@ def download_zip(
249250
"""Download the zip of the branch specified.
250251
251252
:param branch: The name of the branch to download.
253+
:param path: The path in the repository to download.
252254
:param output_path: The path to write the output to.
253255
:param project_id: The ID of the project
254256
:param repository_id: The ID for the repository
@@ -264,7 +266,7 @@ def download_zip(
264266
request_url = f"{self.http_client.api_endpoint(project_id=project_id)}/git/repositories/{repository_id}/Items?"
265267

266268
parameters = {
267-
"path": "/",
269+
"path": path,
268270
"versionDescriptor[versionOptions]": "0",
269271
"versionDescriptor[versionType]": "0",
270272
"versionDescriptor[version]": branch,

0 commit comments

Comments
 (0)