Skip to content
This repository has been archived by the owner on Mar 24, 2024. It is now read-only.

Commit

Permalink
fetch all reports
Browse files Browse the repository at this point in the history
  • Loading branch information
Haoxi Tan committed Jun 5, 2023
1 parent 294796c commit 42c4819
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions reports/fetch_all_reports.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
echo 'make sure your GH_TOKEN is set! public repo access is enough to download the artifact.'
URLS=$(curl https://api.github.com/repos/h4sh5/pypi-auto-scanner/actions/artifacts | grep archive_download_url| cut -d '"' -f 4)

for DL_URL in $URLS
do
echo Downloading from $DL_URL
ARTIFACT_ID=$(echo $DL_URL|cut -d / -f9)
curl -L -H "Accept: application/vnd.github+json" -H "Authorization: Bearer $GH_TOKEN" -H "X-GitHub-Api-Version: 2022-11-28" -o report_${ARTIFACT_ID}.zip "$DL_URL"
done

0 comments on commit 42c4819

Please sign in to comment.