When testing, I have many jobs that run other than R CMD check which will never contain artifacts that end in -snapshots.
I'm proposing that testthat:::gh_find_job() only ask about jobs who actually contain an artifact.
Artifacts can be found (in batches of up to 100) via /repos/OWNER/REPO/actions/runs/RUN_ID/artifacts endpoint. Given we already know the RUN_ID, downloading 1 extra info for clarity seems like an OK tradeoff.
Docs: https://docs.github.com/en/rest/actions/artifacts?apiVersion=2022-11-28#list-workflow-run-artifacts
Truncated example output from endpoint:

When testing, I have many jobs that run other than R CMD check which will never contain artifacts that end in
-snapshots.I'm proposing that
testthat:::gh_find_job()only ask about jobs who actually contain an artifact.Artifacts can be found (in batches of up to 100) via
/repos/OWNER/REPO/actions/runs/RUN_ID/artifactsendpoint. Given we already know theRUN_ID, downloading 1 extra info for clarity seems like an OK tradeoff.Docs: https://docs.github.com/en/rest/actions/artifacts?apiVersion=2022-11-28#list-workflow-run-artifacts
Truncated example output from endpoint: