Skip to content

Instantly share code, notes, and snippets.

@hayzem
Created September 10, 2019 21:25
Show Gist options
  • Save hayzem/28bb2b7426a61d6411c462cd8d785824 to your computer and use it in GitHub Desktop.
Save hayzem/28bb2b7426a61d6411c462cd8d785824 to your computer and use it in GitHub Desktop.
remove circleci repos
#ref: https://discuss.circleci.com/t/remove-projects-we-accidentally-added/27766/2
TOKEN="x"
ORG="MyOrgName"
URL_SUFFIX="/enable?circle-token="$TOKEN
URL_PREFIX="https://circleci.com/api/v1.1/project/github/"$ORG"/"
while IFS='' read -r repo || [[ -n "$repo" ]]; do
sleep 2
curl -X "DELETE" $URL_PREFIX$repo$URL_SUFFIX
done < "$1"
@hayzem
Copy link
Author

hayzem commented Sep 10, 2019

add repo.txt in the same directory with the script adding repository name for each line.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment