legend-sdlc
legend-sdlc copied to clipboard
Dynamically handle `master`, `main` as default branch
Gitlab
starts using main
as their default branch. Right now we hard-coded this to master
The strategy we need to adopt is:
-
Long Term
Dynamically handle this with a new logic centralized at thegetBranch()
function: i.e. Gitlab project API provides information about which is the default branch - See https://docs.gitlab.com/ee/api/projects.html#get-single-project -
Short Term
Tell user to configure the default branch on Gitlab at group level tomaster