Example #1
0
func fixBranch(b string, gh githelper.GitHelper) githelper.GitBranch {
	var branch githelper.GitBranch
	if b != "" {
		branch = githelper.GitBranch{Name: b}
	} else {
		branch = gh.CurrentBranch()
	}
	return branch
}
Example #2
0
func fixOwnerRepo(o string, r string, gh githelper.GitHelper) githelper.GitRepo {
	var repo githelper.GitRepo
	if o != "" && r != "" {
		repo = githelper.GitRepo{Owner: o, Name: r}
	} else {
		repo = gh.GetRepo()
	}
	return repo
}