-
Notifications
You must be signed in to change notification settings - Fork 32
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
(Gitlab) Repo configuration should inherit Global configuration #248
Comments
Thanks for proposing this idea @xNok! This feature isn't on our roadmap, but that may change, and we'll let you know if this gets prioritized. In the meantime, it might be possible to partially workaround this problem by defining your automations at the GitLab Group level. You would still be restricted to a single user_mapping per automation, but you could at least make them apply to all repos. Let me know if you have questions about this. |
@xNok Would something like what is proposed in #226 solve your problem? We like this idea, but it adds quite a bit of complexity to how gitStream processes automations, so it would be a fairly significant effort for us. Another possible workaround I want to propose in the meantime is to condense your automations down to a single file so that you only need to define your user_mapping once. It has the potential to lead to a massive file if you have a lot of automations, but gitStream is designed to handle that. |
It is about the same, but an
ref: https://docs.gitstream.cm/how-it-works/ So far I can have multiple cm files in the same repo, and they are merged according to the doc. I am simply expecting the global cm file to be merged with the local ones.
The resulting configuration is the combination of all three files as expected in the Github setup when breaking the configuration into multiple files. nothing more than a deepmerge between a set of yaml file: |
Is your feature request related to a problem? Please describe.
The
config
at least should be inherited from a global configuration because those will most likely be shared actors repositories such as theuser_mapping
used to fix user auto-discovery.The second use case I see for inheritance is to have a global list of people on vacation so they can be
rejected
from the review selection.Describe the solution you'd like
In the GitLab setup, we have to define a dedicated repo,
cm
that contains the Gitlab CI pipeline for the repo. We also have the option to define a global automation configuration. Any repo configuration should be able to inherit the global configuration.Describe alternatives you've considered
Copy pasting
Additional context
This solution should simply require loading the global and repo configuration and applying a deep merge between both configurations. You can think of more advanced solutions such as
includes
orpatches
, but a simple (deep merge) inheritance would already cover a lot of use cases.The text was updated successfully, but these errors were encountered: