-
Notifications
You must be signed in to change notification settings - Fork 0
Description
During testing we are creating a lot of "test-123" repos: https://gogs-server.fly.dev/myorg
The reason I'm opening this issue now is that there are enough repos in the org that my tests are failing:
If we attempt to drop the whole org (so we can re-create it empty) it doesn't work:
https://gogs-server.fly.dev/org/myorg/settings/delete
I don't want to include a function in the library that would allow someone to accidentally/carelessly "nuke" an entire Org ...
It would be irresponsible of us to build such a weapon never mind include it in the lib.
So instead I propose that we create a bash script that calls the List organization repositories REST API endpoint
https://github.com/gogs/docs-api/tree/master/Repositories#list-organization-repositories
GET /orgs/:orgname/repos
Then runs the delete a repo command in a loop for each repo.
https://stackoverflow.com/questions/32791663/how-to-run-curl-command-with-parameter-in-a-loop-from-bash-script
i.e. we can still use it for development purposes but it wouldn't be exported in the library on Hex.pm