feat: log prefix and enhance handling for branch creation

This commit is contained in:
Mandresy RABENJAHARISON 2025-09-29 17:07:55 +03:00
parent c4cf4aa33e
commit 1b936d8431

View File

@ -116,9 +116,14 @@ func main() {
} else { } else {
// Create and push the branch // Create and push the branch
originBranch := "origin/develop" originBranch := "origin/develop"
logger.Printf("Prefix is : %s", prefix)
if prefix == "hotfix" { if prefix == "hotfix" {
originBranch = "origin/main" originBranch = "origin/main"
} else {
logger.Printf("hotfix != %s", prefix)
} }
logger.Printf("Creating branch '%s' from '%s'.\n", branchName, originBranch) logger.Printf("Creating branch '%s' from '%s'.\n", branchName, originBranch)
err = runCommand(logger, "git", "checkout", "-b", branchName, originBranch) err = runCommand(logger, "git", "checkout", "-b", branchName, originBranch)
if err != nil { if err != nil {