Open txels opened 9 years ago
I think when you first "enable" a repo we should do some initial importing of branch information from a cloned version of the repo.
We may want to rethink the branch model as not having a FK to Repo (that represents a repo in a project) or creating a RepoProject
model, or sthg like that... Or maybe using a natural key for repo <org>/<name>
...?
Why wouldn't we want all branch info to be removed for a repo when that repo is removed from the project? Is this to do with the user making an error and wanting to add the repo back again?
Truth be told, yes, checking and unchecking repos in a project is quite easy, and we don't have a mechanism to recover this data when a repo is reactivated. This may become irrelevant when other stuff is implemented.
But I'm still reiterating the data model in my head, not sure what we have is what we want.
This is because currently a repo model instance represents a repo within a project, and it is deleted upon unlinking. This means all associated info (e.g. branches) is deleted. Branch info is only currently collected by github hooks and not by cloning and analysing repos, meaning that it is lost unrecoverably.
This requires some discussion.