Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Delete training repos after a few months. #404

Open
rulasg opened this issue Sep 18, 2023 · 3 comments
Open

Delete training repos after a few months. #404

rulasg opened this issue Sep 18, 2023 · 3 comments

Comments

@rulasg
Copy link
Contributor

rulasg commented Sep 18, 2023

As a trainer
I would like GH to delete exiting repos a few months later than creation, aka training date.
So that if the same student goes to the same training later, the creation of new repos will not fail for the new training.

I had a training where a student had already a repo created. He did not have access to it as the invitation had expired already.
As I am not the creator I could not remove the repo to allow the script create the a new one for my training.

collision repo

CC: @mericstam

@amyschoen
Copy link
Collaborator

I was considering adding back time-based repo clean up to the scripts similar to what we had initially. Not sure that would solve your problem since it sounds like your issue is that you cannot delete repos. Is it possible to add repo deletion rights to your token, or do you not have the ability to delete repos in the org you're using? We teach from a practice org where I make my instructors org owners.

@rulasg
Copy link
Contributor Author

rulasg commented Sep 18, 2023

Hi @amyschoen I can not delete the repo because I did not create it. The repo was left behind by another trainer months back. I have no problem cleaning repos I created with option 7 of the script.

Adding a cleanup step or even better a garbage collector workflow that removes all repos older than 2 months would fix the problem. 😄

Thanks.

@amyschoen
Copy link
Collaborator

I like the workflow idea. It's on my to-do list to look into adding workflows for generating repos when I have some time since my current efforts to add GHEC support have experienced some hiccups.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants