summaryrefslogtreecommitdiff
path: root/repos.go
diff options
context:
space:
mode:
Diffstat (limited to 'repos.go')
-rw-r--r--repos.go26
1 files changed, 26 insertions, 0 deletions
diff --git a/repos.go b/repos.go
index a0bce2e..54eec7a 100644
--- a/repos.go
+++ b/repos.go
@@ -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
+}