diff options
| author | Jeff Carr <[email protected]> | 2024-12-17 18:49:11 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2024-12-17 18:49:11 -0600 |
| commit | a8d32f0e1624567d93ecb8d6ed0fbc37277303e2 (patch) | |
| tree | 4d34f147ece94582210704a626a0d940a158ba16 /scan.go | |
| parent | 5d232293a002cc4b5bcb949a0e329337ab4e90b4 (diff) | |
more things moved to gitpbv0.22.35
Diffstat (limited to 'scan.go')
| -rw-r--r-- | scan.go | 21 |
1 files changed, 13 insertions, 8 deletions
@@ -5,6 +5,7 @@ import ( "strconv" "strings" + "go.wit.com/lib/protobuf/gitpb" "go.wit.com/log" ) @@ -41,21 +42,25 @@ func (r *RepoList) ScanRepositories() (int, string) { } func (r *RepoRow) NewScan() int { + return r.NewScan2(r.pb) +} + +func (r *RepoRow) NewScan2(pb *gitpb.Repo) int { var changed int = 0 if r.Status == nil { log.Log(REPOWARN, "repo.Status = nil. not initialized for some reason") return changed } + if pb == nil { + log.Log(REPOWARN, "NewScan() pb = nil") + return changed + } // run the repostatus update r.Status.Update() if r.lastTag != nil { - if r.pb != nil { - r.lastTag.SetLabel(r.pb.GetLastTag()) - } else { - log.Info("r.pb was nil") - } + r.lastTag.SetLabel(pb.GetLastTag()) } if r.masterVersion == nil { @@ -64,9 +69,9 @@ func (r *RepoRow) NewScan() int { if r.pb == nil { panic("what the fuck pb") } - r.masterVersion.SetLabel(r.pb.GetMasterVersion()) - r.develVersion.SetLabel(r.pb.GetDevelVersion()) - r.userVersion.SetLabel(r.pb.GetUserVersion()) + r.masterVersion.SetLabel(pb.GetMasterVersion()) + r.develVersion.SetLabel(pb.GetDevelVersion()) + r.userVersion.SetLabel(pb.GetUserVersion()) r.gitState.SetLabel(r.Status.GitState()) r.currentName.SetLabel(r.Status.GetCurrentBranchName()) r.currentVersion.SetLabel(r.Status.GetCurrentBranchVersion()) |
