Last active
March 10, 2025 19:27
-
-
Save daveio/0732f21cc5aafc37baabcdaae3afb3a4 to your computer and use it in GitHub Desktop.
Remove all workflow runs from a GitHub repository
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function wipe-workflows -d "Wipe all workflow runs for a GitHub repository. Invoke with username/reponame as a parameter." | |
set -lx REPONAME $argv[1] | |
echo "Wiping all workflow runs for $REPONAME..." | |
gh api --paginate "/repos/$REPONAME/actions/runs" | jq '.workflow_runs.[].id' | \ | |
parallel -j 16 "echo {}; gh api --silent -X DELETE /repos/$REPONAME/actions/runs/{}" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment