diff options
Diffstat (limited to 'repos.go')
| -rw-r--r-- | repos.go | 26 |
1 files changed, 26 insertions, 0 deletions
@@ -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 +} |
