Skip to content

Commit 864fa12

Browse files
committed
formatting
1 parent d7fb1f1 commit 864fa12

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

ci-tools/latest-pkgci.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,10 @@
77
OWNER = "iree-org"
88
REPO = "iree"
99

10-
API_URL = f"https://api.github.com/repos/{OWNER}/{REPO}/actions/workflows/pkgci.yml/runs"
10+
API_URL = (
11+
f"https://api.github.com/repos/{OWNER}/{REPO}/actions/workflows/pkgci.yml/runs"
12+
)
13+
1114

1215
# Get the latest workflow run ID for pkgci.yml
1316
def get_latest_pkgci_workflow_run():
@@ -35,6 +38,7 @@ def get_latest_pkgci_workflow_run():
3538
print(f"Error fetching workflow runs: {response.status_code}")
3639
return None
3740

41+
3842
# Get the artifacts of a specific workflow run
3943
def get_artifacts(workflow_run_id, artifacts_url):
4044
headers = {
@@ -50,12 +54,13 @@ def get_artifacts(workflow_run_id, artifacts_url):
5054
print(f"Artifacts for pkgci.yml workflow run {workflow_run_id}:")
5155
for artifact in artifacts:
5256
print(f"- {artifact['name']} (Size: {artifact['size_in_bytes']} bytes)")
53-
download_artifact(artifact['archive_download_url'], artifact['name'])
57+
download_artifact(artifact["archive_download_url"], artifact["name"])
5458
else:
5559
print("No artifacts found for the pkgci.yml workflow run.")
5660
else:
5761
print(f"Error fetching artifacts: {response.status_code}")
5862

63+
5964
# Download an artifact
6065
def download_artifact(download_url, artifact_name):
6166
headers = {
@@ -76,6 +81,7 @@ def download_artifact(download_url, artifact_name):
7681
else:
7782
print(f"Error downloading artifact '{artifact_name}': {response.status_code}")
7883

84+
7985
if __name__ == "__main__":
8086
workflow_run_id, artifact_url = get_latest_pkgci_workflow_run()
8187
if workflow_run_id:

0 commit comments

Comments
 (0)