diff options
| author | Jeff Carr <[email protected]> | 2025-09-27 02:15:32 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-09-27 02:15:32 -0500 |
| commit | ac07bf7b29c61f99a9d935bb8ff2126bb278667b (patch) | |
| tree | 17e547976a121639873a070c4a36c8829d35601e | |
| parent | 1232d4e0f85f0fce4b3415804650e611aa474add (diff) | |
more on git pullv0.0.156
| -rw-r--r-- | repos.go | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/repos.go b/repos.go new file mode 100644 index 0000000..a0bce2e --- /dev/null +++ b/repos.go @@ -0,0 +1,35 @@ +// Copyright 2025 WIT.COM Inc Licensed GPL 3.0 + +package forgepb + +import ( + "go.wit.com/lib/protobuf/gitpb" + "go.wit.com/log" + "google.golang.org/protobuf/proto" +) + +func (f *Forge) PrepareCheckRepos() *gitpb.Repos { + submit := gitpb.NewRepos() + for repo := range f.Repos.IterByFullPath() { + newrepo := new(gitpb.Repo) + newrepo.Namespace = repo.Namespace + newrepo.URL = repo.URL + newrepo.Tags = gitpb.NewGitTags() + + if repo.Tags == nil { + log.Infof("%s no tags\n", repo.FullPath) + continue + } + + if repo.Tags.Master != nil { + newrepo.Tags.Master = proto.Clone(repo.Tags.Master).(*gitpb.GitTag) + } else { + log.Infof("no master tag %s\n", repo.FullPath) + } + if repo.Tags.Devel != nil { + newrepo.Tags.Devel = proto.Clone(repo.Tags.Devel).(*gitpb.GitTag) + } + submit.Append(newrepo) + } + return submit +} |
