Skip to content

Instantly share code, notes, and snippets.

@BrandonRomano
Last active August 29, 2015 14:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save BrandonRomano/0e3f2478539043887569 to your computer and use it in GitHub Desktop.
Save BrandonRomano/0e3f2478539043887569 to your computer and use it in GitHub Desktop.
Find deleted Github tags
last_issue=""
github_token=""
$repo_owner=""
$repo_name=""
deleted_tag=""
output_file=""
for i in $(eval echo {1..$last_issue})
do
comp=$(curl --header "Authorization: token $github_token" \
--header 'Accept: application/vnd.github.v3.raw' \
--location "https://api.github.com/repos/$repo_owner/$repo_name/issues/$i/events" \
| grep "name" | grep "$deleted_tag")
if [[ "$comp" != "" ]]; then
echo -n "$i," >> $output_file
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment