2024-12-02 07:00:28 -06:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
|
|
|
"fmt"
|
|
|
|
|
|
|
|
"go.wit.com/lib/gui/repolist"
|
|
|
|
"go.wit.com/log"
|
|
|
|
)
|
|
|
|
|
|
|
|
func PrintReport(readonly string, onlydirty string, perfect string) {
|
|
|
|
var count int
|
|
|
|
|
|
|
|
log.Info(repolist.ReportHeader())
|
|
|
|
|
|
|
|
loop := me.repos.View.ReposSortByName()
|
|
|
|
for loop.Scan() {
|
|
|
|
repo := loop.Repo()
|
|
|
|
|
|
|
|
count += 1
|
|
|
|
header := repo.StandardHeader()
|
|
|
|
if onlydirty == "true" {
|
|
|
|
if repo.CheckDirty() {
|
|
|
|
log.Info(header + "")
|
|
|
|
}
|
|
|
|
continue
|
|
|
|
}
|
|
|
|
|
2024-12-17 07:03:17 -06:00
|
|
|
if me.forge.Config.IsReadOnly(repo.GetGoPath()) {
|
2024-12-02 07:00:28 -06:00
|
|
|
if readonly == "true" {
|
|
|
|
log.Info(header + "readonly")
|
|
|
|
}
|
|
|
|
continue
|
|
|
|
}
|
|
|
|
if repo.State() == "PERFECT" {
|
|
|
|
if perfect == "false" {
|
|
|
|
continue
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if repo.State() != "merge to main" {
|
|
|
|
log.Info(header + "")
|
|
|
|
continue
|
|
|
|
}
|
|
|
|
if repo.CheckDirty() {
|
|
|
|
log.Info(header + "")
|
|
|
|
continue
|
|
|
|
}
|
|
|
|
log.Info(header + "")
|
2024-12-17 07:03:17 -06:00
|
|
|
check := me.forge.FindByGoPath(repo.GetGoPath())
|
2024-12-02 07:00:28 -06:00
|
|
|
if check == nil {
|
2024-12-17 07:03:17 -06:00
|
|
|
log.Info("boo, you didn't git clone", repo.GetGoPath())
|
2024-12-02 07:00:28 -06:00
|
|
|
continue
|
|
|
|
}
|
|
|
|
me.forge.StandardReleaseHeader(check, repo.State())
|
|
|
|
}
|
|
|
|
log.Info(fmt.Sprintf("EVERYTHING WORKED repo count = %d", count))
|
|
|
|
}
|