-
Notifications
You must be signed in to change notification settings - Fork 86
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
Adding default settings for new repositories creation #46
Comments
You have several ideas packed into one issue, and I actually had to reread several times your post to really understand it all ☺. ① Configuration file for "provider repos"I'm not in favor of configuring remote repositories using extra config files. I chose to setup It really is a design choice, I want git-repo to be stateless, using the git repository and the remote API as "data store". AFAICT, you can configure the services to have sensible defaults, and do some changes only on what's needed. Though, nothing would prevent you from doing a little script that would do just that, taking advantage of a feature such as explained below in ②. ② Configuration of settings for repositoriesThere, I do understand your frustration, and there might be a case for extending the API to setup the different remote repositories. Maybe a simple interface that accesses configuration options such as:
could be a good way to implement a feature to configure the repositories, which would be a single simple interface for all the supported services APIs. ③ Add a
|
Thanks for the quick and detailed reply. I would like to declare the configuration of my "provider repos" in code and by configuration rather than scripts. I do see such a feature as differnt than what git-repo currently does and understand if the functionality just does not fit. Would you characterized git-repo as more of a gitflow tool ( other than Currently, git-repos has A simplistic hypothetical:
With the addition of Lastly, once |
Sorry for taking long to get back to you. Overall I believe this is a great feature to add, but it's not an obvious easy feature, and to be honest it's not in the ballpark for the next few releases (except if you implement it and push a PR!). That being said, I believe there should be four feature requests, the first two that are almost trivial to implement, the third one would be quite a headache, and the last one should be done another way. So I guess I'll have to split this issue in 4 new tickets! ① defaults for git-repo XXX createFor that feature I believe we should use something that makes it clear that we're talking about default values for create. So I guess I'd see more something like:
② Implement default configuration values and inheritenceOnce the former has been implemented, this new feature makes sense:
and shouldn't be hard to implement, as configuration is being checked in those places:
③ implement "binding" between repository servicesthat one is a tougher one. I guess that your
I'm not sure about the My only issue with that feature, is that it's a bit too meta, and implementing this might complexify the code base a bit too much, the tests will be a headache. So I'd rather keep that feature on the side once we got more lower level features implemented first. ④ changing the settingsAbout your
|
There is
git-repo config
that I am trying not to confuse. This issue is about configuring GitHub, GitLab, Bitbucket and not configuring git-repo. Maybe this is out of scope and fits in better with something such as Terraform.ioProblem:
Repos will have a handful of settings, such as enabled services, branch protection, webhooks, merge types, mirroring, etc. Click though web gui introduces inconsistencies and other disadvantages.
If my org were to primarily use GitLab but mirror on GitHub then there are two namespaces to clear and two different configurations to deal with.
Proposed:
Configuration of provider repos in yaml, json (with comments, just minify to strip first), or toml.
A cmd to act on the configuration file such as
hub|lab|bit|all create|update|remove
git all create
would create whatever repos are configured, in my case, github and gitlab.The text was updated successfully, but these errors were encountered: