The repository contains code for deleting Github Enterprise repos in bulk
The script requires below prerequisites to be installed in your Linux System.
curl
- Access to internet from the server (example: configured proxy on the server)
Set the below three variables in the script.
- ES_ENDPOINT="https://XYZ.ES.AWS.COM:PORT"
- ES_API="/_cat/indices?v&s=index"
- ES_TOKEN="YOUR-TOKEN"
The script takes in exactly one parameter which is the number of days for which to retain the indexes in elasticsearch.
./es-bulk-delete-index.sh 4
Here the first argument "4" makes the script retain 4 days of indexes in elasticsearch.
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -am 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request.
- Please have a look at CONTRIBUTING.md for further details on teram for contributing.