Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@
"python.testing.autoTestDiscoverOnSaveEnabled": true,
"python.envFile": "${workspaceFolder}/.env",
"python.languageServer": "Pylance",
"[python]": {
"editor.defaultFormatter": "ms-python.black-formatter",
},
"black-formatter.args": [
"--line-length",
"100"
Expand Down
17 changes: 17 additions & 0 deletions simple_ado/builds.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,23 @@ def get_artifact_info(
response = self.http_client.get(request_url)
return self.http_client.decode_response(response)

def get_build_timeline(self, *, project_id: str, build_id: int) -> ADOResponse:
"""Get the build timeline.

:param project_id: The ID of the project
:param build_id: The ID of the build

:returns: The ADO response with the build timeline data in it
"""
self.log.debug(f"Fetching build timeline for build {build_id}...")

request_url = (
self.http_client.api_endpoint(project_id=project_id)
+ f"/build/builds/{build_id}/timeline?api-version=7.1"
)
response = self.http_client.get(request_url)
return self.http_client.decode_response(response)

def download_artifact(
self,
*,
Expand Down