coArchi's default branch - "Master"

Started by Xiaoqi, March 11, 2021, 11:22:11 AM

Previous topic - Next topic

Xiaoqi

Hello,

Since Github had changed the default branch from "Master" to "Main" from Oct 1st 2020, and in our project, we also use Azure DevOps, it also has "main" as the default branch.

When I add local model to workspace, coArchi automatically ask for DevOps' GIT URL / UserName / Credential, and then do the publish, but to "master" branch, in DevOps repository, then there's one separate "master" branch created.

For sure, I can then delete "main" branch, and point "master" as the Default branch, but will our coArchi going to plan switch default branch to "main" as well then?

I'm using the latest coArchi 0.7.1

Thanks, and forgive me if there's previous topics already touch on this.

Regards,
Xiaoqi

Phil Beauvoir

This version of coArchi uses "master" as this was decided years ago. Changing this now to "main" could lead to problems (not sure about impact). For the next version of coArchi (2) we plan to use "main" as the default.

See https://github.com/archimatetool/archi-modelrepository-plugin2/issues/5
If you value and use Archi, please consider making a donation!
Ask your ArchiMate related questions to the ArchiMate Community's Discussion Board.

Xiaoqi

Thanks Phil for your quick answer, understand that, and I'll switch "master" as my default branch in Azure DevOps, that's manageable. And looking forward the coArchi2 then.

Regards, Xiaoqi

stevekay72

Just a thought but would it be possible to have a configuration item that allowed you to specify the default branch name in general settings, or maybe better to allow the opportunity to supply a branch name when adding the repository?

As this is the first-time connection experience issue only, and subsequently you can manipulate branches within coArchi, then the addition of another field (which could be defaulted) would be no significant extra effort.

This would allow the greatest flexibility and also mean there is no debate over 'master' vs 'main' as it could easily be called 'bob'  :D

The alternative would be to use something like the GitHub API where you can extract the default branch information, but that would require significantly extra coding to allow the same functionality with say a GitLab repo, as the APIs are not common in this regard.

Phil Beauvoir

Quote from: stevekay72 on August 31, 2021, 10:01:21 AM
Just a thought but would it be possible to have a configuration item that allowed you to specify the default branch name in general settings, or maybe better to allow the opportunity to supply a branch name when adding the repository?

As this is the first-time connection experience issue only, and subsequently you can manipulate branches within coArchi, then the addition of another field (which could be defaulted) would be no significant extra effort.

This would allow the greatest flexibility and also mean there is no debate over 'master' vs 'main' as it could easily be called 'bob'  :D

The alternative would be to use something like the GitHub API where you can extract the default branch information, but that would require significantly extra coding to allow the same functionality with say a GitLab repo, as the APIs are not common in this regard.

Hi Steve, thanks for the feedback on this issue, I think those are good ideas. These are things that we will certainly consider for coArchi 2.
If you value and use Archi, please consider making a donation!
Ask your ArchiMate related questions to the ArchiMate Community's Discussion Board.