diff options
| author | Jeff Carr <[email protected]> | 2025-09-27 11:17:01 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-09-27 11:17:37 -0500 |
| commit | e59f87c92c8df9465952ecd8c76478e4dc351608 (patch) | |
| tree | 27bb48a65d95a3eda15d795911bbb3af2213ee14 | |
| parent | ac07bf7b29c61f99a9d935bb8ff2126bb278667b (diff) | |
show devel branchesv0.0.157
| -rw-r--r-- | humanForgedTable.go | 36 | ||||
| -rw-r--r-- | repos.go | 26 |
2 files changed, 51 insertions, 11 deletions
diff --git a/humanForgedTable.go b/humanForgedTable.go index a4d19f5..96472da 100644 --- a/humanForgedTable.go +++ b/humanForgedTable.go @@ -17,30 +17,44 @@ func (f *Forge) makeForgedTable(pb *gitpb.Repos) *gitpb.ReposTable { var col *gitpb.RepoAnyFunc - col = t.AddMasterVersion() - col.Width = 7 - col = t.AddMasterBranchName() + col.Width = 3 + + col = t.AddMasterVersion() col.Width = 10 - col = t.AddStringFunc("blah", func(r *gitpb.Repo) string { + col = t.AddStringFunc("hash", func(r *gitpb.Repo) string { if r.Tags == nil { - return "tags=nil" + return "nil" } if r.Tags.Master == nil { - return "mtag=nil" + return "nil" } return r.Tags.Master.Hash }) - col.Width = 12 + col.Width = 6 + + col = t.AddDevelBranchName() + col.Width = 3 + + col = t.AddDevelVersion() + col.Width = 10 + + col = t.AddStringFunc("hash", func(r *gitpb.Repo) string { + if r.Tags == nil { + return "nil" + } + if r.Tags.Devel == nil { + return "nil" + } + return r.Tags.Devel.Hash + }) + col.Width = 6 col = t.AddNamespace() - col.Width = 32 + col.Width = 42 col = t.AddURL() - col.Width = 32 - - col = t.AddFullPath() col.Width = -1 return t } @@ -33,3 +33,29 @@ func (f *Forge) PrepareCheckRepos() *gitpb.Repos { } return submit } + +func (f *Forge) PrepareCheckRepo(namespace string) *gitpb.Repo { + found := f.Repos.FindByNamespace(namespace) + if found == nil { + return nil + } + newrepo := new(gitpb.Repo) + newrepo.Namespace = found.Namespace + newrepo.URL = found.URL + newrepo.Tags = gitpb.NewGitTags() + + if found.Tags == nil { + log.Infof("%s Tags == nil\n", found.FullPath) + return newrepo + } + + if found.Tags.Master != nil { + newrepo.Tags.Master = proto.Clone(found.Tags.Master).(*gitpb.GitTag) + } else { + log.Infof("no master tag %s\n", found.FullPath) + } + if found.Tags.Devel != nil { + newrepo.Tags.Devel = proto.Clone(found.Tags.Devel).(*gitpb.GitTag) + } + return newrepo +} |
