summaryrefslogtreecommitdiff
path: root/repoNew.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-12-13 16:18:03 -0600
committerJeff Carr <[email protected]>2024-12-13 16:18:03 -0600
commitb715fdd11a8dd169c4edd7f093333553878c1f08 (patch)
treebf0d8378012511205f95f60007eeeee39b1ac180 /repoNew.go
parent4a2568fea3ddab7c1684ce8c474a1f19fe7e4205 (diff)
make devel and user branchesv0.0.28
Diffstat (limited to 'repoNew.go')
-rw-r--r--repoNew.go24
1 files changed, 24 insertions, 0 deletions
diff --git a/repoNew.go b/repoNew.go
index 209f807..b87ee4c 100644
--- a/repoNew.go
+++ b/repoNew.go
@@ -74,3 +74,27 @@ func (f *Forge) VerifyBranchNames(newr *gitpb.Repo) {
}
}
}
+
+// todo: check the forge config
+func (f *Forge) configUserBranchName(repo *gitpb.Repo) string {
+ if repo.GetUserBranchName() != "" {
+ return repo.GetUserBranchName()
+ }
+ usr, _ := user.Current()
+ uname := usr.Username
+ return uname
+}
+
+// todo: check the forge config
+func (f *Forge) configDevelBranchName(repo *gitpb.Repo) string {
+ if repo.GetDevelBranchName() != "" {
+ return repo.GetDevelBranchName()
+ }
+ if repo.IsBranch("guidevel") {
+ return "guidevel"
+ }
+ if repo.IsBranch("devel") {
+ return "devel"
+ }
+ return "devel"
+}