Last active
January 13, 2026 13:52
-
-
Save ponfertato/10a09fc5cf46e42c8fa4be014671362e to your computer and use it in GitHub Desktop.
Delete issues in github repo that have any of specified labels and were created before 2025-12-31 23:59:59
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
| REPO="potatoenergy/status" | |
| LABELS='mindustry-server,mindustry-server-port,minecraft-server,minecraft-server-port' | |
| CUTOFF="2025-12-31T23:59:59Z" | |
| gh issue list --repo "$REPO" --state all --limit 1000 --json number,createdAt,labels | jq -r --arg labels "$LABELS" --arg cutoff "$CUTOFF" '($labels|split(",")) as $arr | .[] | .labels = (.labels//[]) | select((.createdAt < $cutoff) and any(.labels[]; (.name|ascii_downcase) as $n | ($arr[]|ascii_downcase) == $n)) | .number' | while read -r n; do gh issue delete "$n" --repo "$REPO" --yes; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment