#!/usr/bin/env bash # `dwr` - delete workflow runs (by DJ Adams) # ref: # ref: [Mass deletion of GitHub Actions workflow runs](https://qmacro.org/autodidactics/2021/03/26/mass-deletion-of-github-actions-workflow-runs) @@ # LICENSE: "Feel free to steal, modify, or make fun of" (from ) # spell-checker:ignore (options) multi ; (people) DJ Adams * qmacro ; (words) gsub # Given an "owner/repo" name, such as "qmacro/thinking-aloud", # retrieve the workflow runs for that repo and present them in a # list. Selected runs will be deleted. Uses the GitHub API. # Requires gh (GitHub CLI) and jq (JSON processor) # First version set -o errexit set -o pipefail declare repo=${1:?No owner/repo specified} jq_script() { cat <