Closed alexellis closed 2 years ago
I think this should be relatively simple to implement.
We parse the remote .DEREK.yml
here into a separate types.DerekRepoConfig
and then add a method call immediately afterwards to merge the existing local config with that retrieved remotely, de-duping in the process.
That approach sounds good to me.
I could take this on as my first contribution to the Derek project :smile:
Sounds good to me, thanks for commenting so that other people know it's being tackled 👍 🤖
I did this in ofc-bootstrap, so should be easy to plugin in the approach from there. I think this is fair game for anyone to pick up now.
@Waterdrips, WDYT?
yeh that would be useful. I can pick that up, or we could see if any of our new contributors want to take it? (and i could focus on the ofc helm chart :sweat_smile: )
Don't mind, as long as it can be done as in finished within the next week to keep the merge/rebase feature moving forward.
Ah if we need it done for that I'll take it and do it this weekend.
Merci :+1:
Derek close: implemented in #140
Expected Behaviour
The config redirect which means a local repo can have just a single entry "redirect_url: https://" rather than a complete .DEREK.yml file has been really useful across the dozen or so OpenFaaS repos. There are times where a local override is needed for a specific repo.
I would see this working as an intersection with the local override taking precedence. This would also be useful for the rebase feature in #91.
There may be a generic config set up in the "main" repo - all other repos may point there defining "@alexellis has rebase access" - then the CLI repo for instance may have @rgee0 and @johnmccabe as having rebase access, so you'd end up with the following for the CLI repo: @alexellis @rgee0 and @johnmccabe without having to specify that @alexellis had access to this feature.
Current Behaviour
Possible, but with duplication and maintenance is required for separate files.
Possible solution
If redirect_url is present, fetch that config file then overlay it with the file being read afterwards.