mirror of
https://github.com/progval/irctest.git
synced 2025-04-05 06:49:47 +00:00
dashboard: fix pagination
This commit is contained in:
@ -27,14 +27,15 @@ class Artifact:
|
||||
|
||||
def iter_run_artifacts(repo: str, run_id: int) -> Iterator[Artifact]:
|
||||
request = urllib.request.Request(
|
||||
f"https://api.github.com/repos/{repo}/actions/runs/{run_id}/artifacts",
|
||||
f"https://api.github.com/repos/{repo}/actions/runs/{run_id}/artifacts"
|
||||
"?per_page=100",
|
||||
headers={"Accept": "application/vnd.github.v3+json"},
|
||||
)
|
||||
|
||||
response = urllib.request.urlopen(request)
|
||||
|
||||
for artifact in json.load(response)["artifacts"]:
|
||||
if not artifact["name"].startswith(("pytest_results_", "pytest results ")):
|
||||
if not artifact["name"].startswith(("pytest-results_", "pytest results ")):
|
||||
continue
|
||||
if artifact["expired"]:
|
||||
continue
|
||||
|
Reference in New Issue
Block a user