Skip to content

Instantly share code, notes, and snippets.

@turesheim
Last active December 14, 2015 12:48
Show Gist options
  • Save turesheim/5088726 to your computer and use it in GitHub Desktop.
Save turesheim/5088726 to your computer and use it in GitHub Desktop.
Bash script for closing issues 50-5000 that were inadvertently created using Zapier synchronization.
#!/bin/sh
for issue in {50..5000}
do
echo "Closing issue #$issue"
curl --progress-bar --user "<github-user>:<github-password>" -X PATCH \
--data '{"state":"closed","title":"Inadvertently created by Zapier sync","body":""}' \
https://api.github.com/repos/<github-user>/<github-repo>/issues/$issue > /dev/null
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment