mirror of
https://github.com/progval/irctest.git
synced 2025-04-07 15:59:49 +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]:
|
def iter_run_artifacts(repo: str, run_id: int) -> Iterator[Artifact]:
|
||||||
request = urllib.request.Request(
|
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"},
|
headers={"Accept": "application/vnd.github.v3+json"},
|
||||||
)
|
)
|
||||||
|
|
||||||
response = urllib.request.urlopen(request)
|
response = urllib.request.urlopen(request)
|
||||||
|
|
||||||
for artifact in json.load(response)["artifacts"]:
|
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
|
continue
|
||||||
if artifact["expired"]:
|
if artifact["expired"]:
|
||||||
continue
|
continue
|
||||||
|
Reference in New Issue
Block a user