// Copyright 2025 WIT.COM Inc Licensed GPL 3.0 package forgepb import ( "go.wit.com/lib/cobol" "go.wit.com/lib/protobuf/gitpb" "go.wit.com/log" ) // returns footer func (f *Forge) PrintPullTable(pb *gitpb.Repos) string { tablePB := f.makePullTable(pb) tablePB.PrintTable() return log.Sprintf("fpb.PullTable: %d repos", pb.Len()) } func (f *Forge) makePullTable(pb *gitpb.Repos) *gitpb.ReposTable { t := pb.NewTable("pullTable") t.NewUuid() var col *gitpb.RepoFunc // var col int col = t.AddMasterBranchName() col.Width = 10 col = t.AddMasterVersion() // col.SetTitle("mver") col.Width = 15 col = t.AddStringFunc("age", func(r *gitpb.Repo) string { if r.IsDirty() { return "*" } dur := r.NewestAge() return cobol.FormatDuration(dur) }) col.Width = 3 col = t.AddDevelVersion() col.Width = 15 col = t.AddNamespace() col.Width = 18 col = t.AddFullPath() col.Width = -1 return t }