commodore icon indicating copy to clipboard operation
commodore copied to clipboard

Support arbitrary default branch names for cluster catalog and dependency repositories

Open simu opened this issue 2 years ago • 0 comments

Context

In #915, we ensure that new cluster catalog repos are initialized with branch master. However, there's no real requirement that catalog repos must use master as the default branch. Project Syn also doesn't configure ArgoCD to explicitly check out branch master, but instead just lets ArgoCD check out the catalog repo default branch.

We should consider restoring the behavior that Commodore respects the user's init.defaultBranch when creating cluster catalog repositories.

Additionally, we should also respect the user's init.defaultBranch when creating new dependencies. However, to allow that we'll need to update the dependency template to support additional default branches for the tests (cf. https://github.com/projectsyn/commodore-component-template/issues/13). Notably, the dependency sync mechanism already supports arbitrary default branches.

Task deliverables

  • Commodore respects the user's init.defaultBranch when creating new repositories (catalog or dependencies)
  • Commodore correctly identifies the local default branch for newly created repos when pushing to a remote repo which doesn't have a default branch yet.
  • Tests are updated
  • Documentation is updated

simu avatar Feb 09 '24 10:02 simu