summaryrefslogtreecommitdiff
path: root/doVerifyUser.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-01-28 23:59:12 -0600
committerJeff Carr <[email protected]>2025-01-29 12:18:16 -0600
commit24988d440cf7a7919c964447b8997390ac28da0b (patch)
treead720d1e5996b251b10b6f6cc60f70fb1904da53 /doVerifyUser.go
parent345c1ee9b1a3d5a55fef53edb2f3a6d89aaf2fcd (diff)
rethink doVerify() strategy. put in the GUI instead
Diffstat (limited to 'doVerifyUser.go')
-rw-r--r--doVerifyUser.go55
1 files changed, 55 insertions, 0 deletions
diff --git a/doVerifyUser.go b/doVerifyUser.go
new file mode 100644
index 0000000..8c1013c
--- /dev/null
+++ b/doVerifyUser.go
@@ -0,0 +1,55 @@
+package main
+
+import (
+ "go.wit.com/lib/protobuf/gitpb"
+ "go.wit.com/log"
+)
+
+func doVerifyUser() error {
+ me.found = new(gitpb.Repos)
+ all := me.forge.Repos.SortByFullPath()
+ for all.Scan() {
+ repo := all.Next()
+ if repo.IsDirty() {
+ log.Info(repo.GetGoPath(), "is dirty")
+ me.found.AppendByGoPath(repo)
+ continue
+ }
+ if repo.ExistsUserBranchRemote() {
+ }
+
+ if repo.ExistsUserBranch() {
+ }
+ if repo.GetMasterBranchName() == repo.GetCurrentBranchName() {
+ log.Info(repo.GetGoPath(), "is not on master branch")
+ continue
+ }
+
+ devel := repo.GetDevelBranchName()
+ if argv.Verbose {
+ log.Printf("Start clean devel branch: %s %s\n", repo.GetGoPath(), devel)
+ }
+
+ // check if devel branch exists in remote repo
+ if repo.IsBranchRemote(devel) {
+ if err := doCleanDevelRepo(repo); err != nil {
+ log.Info(repo.GetGoPath(), "verify clean failed")
+ }
+ // can not continue
+ continue
+ }
+ // devel branch is only local
+ /*
+ todo: something?
+ devname := repo.GetDevelBranchName()
+ if err := requiresGitPush(repo, devname); err != nil {
+ log.Info(repo.GetGoPath(), "is out of sync with upstream")
+ return err
+ }
+ */
+ }
+ return nil
+}
+
+func verifyRemoteUserBranch(repo *gitpb.Repo) {
+}