Skip to content

Instantly share code, notes, and snippets.

@daveio
Last active March 10, 2025 19:27
Show Gist options
  • Save daveio/0732f21cc5aafc37baabcdaae3afb3a4 to your computer and use it in GitHub Desktop.
Save daveio/0732f21cc5aafc37baabcdaae3afb3a4 to your computer and use it in GitHub Desktop.
Remove all workflow runs from a GitHub repository
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