fix branch names if they somehow end up blank
This commit is contained in:
parent
9bcf2d968c
commit
b70417565a
15
doNormal.go
15
doNormal.go
|
@ -14,7 +14,7 @@ func doNormal() bool {
|
||||||
if allerr := me.forge.RillRepos(checkNormalRepoState); len(allerr) != 0 {
|
if allerr := me.forge.RillRepos(checkNormalRepoState); len(allerr) != 0 {
|
||||||
log.Info("Some repos are not in a 'normal' state. error count =", len(allerr))
|
log.Info("Some repos are not in a 'normal' state. error count =", len(allerr))
|
||||||
for repo, err := range allerr {
|
for repo, err := range allerr {
|
||||||
log.Info("repo not normal", repo.GetFullPath(), err)
|
log.Info("ABNORMAL:", repo.GetFullPath(), err)
|
||||||
}
|
}
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
@ -27,6 +27,19 @@ func doNormal() bool {
|
||||||
// this needs to run each time in case repos were added manually by the user
|
// this needs to run each time in case repos were added manually by the user
|
||||||
// this also verifies that
|
// this also verifies that
|
||||||
func checkNormalRepoState(repo *gitpb.Repo) error {
|
func checkNormalRepoState(repo *gitpb.Repo) error {
|
||||||
|
if repo.GetMasterBranchName() == "" {
|
||||||
|
me.forge.VerifyBranchNames(repo)
|
||||||
|
configSave = true
|
||||||
|
}
|
||||||
|
if repo.GetMasterBranchName() == "" {
|
||||||
|
return log.Errorf("master branch name blank")
|
||||||
|
}
|
||||||
|
if repo.GetDevelBranchName() == "" {
|
||||||
|
return log.Errorf("devel branch name blank")
|
||||||
|
}
|
||||||
|
if repo.GetUserBranchName() == "" {
|
||||||
|
return log.Errorf("user branch name blank")
|
||||||
|
}
|
||||||
if _, err := repo.MakeLocalDevelBranch(); err != nil {
|
if _, err := repo.MakeLocalDevelBranch(); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue