diff options
Diffstat (limited to 'http.go')
| -rw-r--r-- | http.go | 24 |
1 files changed, 22 insertions, 2 deletions
@@ -42,7 +42,7 @@ func (f *Forge) HttpPost(url string, data []byte) ([]byte, error) { } func (f *Forge) LookupPBorig(check *gitpb.Repos) (*gitpb.Repos, error) { - url := forgeURL + "lookup" + url := f.forgeURL + "lookup" for repo := range check.IterByFullPath() { if repo.Namespace == "" { @@ -54,7 +54,27 @@ func (f *Forge) LookupPBorig(check *gitpb.Repos) (*gitpb.Repos, error) { } func (f *Forge) LookupPB(check *gitpb.Repos) (*gitpb.Repos, error) { - url := forgeURL + "lookup" + url := f.forgeURL + "lookup" + + queryPB := gitpb.NewRepos() + + for repo := range check.IterByFullPath() { + ns := repo.Namespace + if ns == "" { + ns = repo.GoInfo.GoPath + } + + newr := new(gitpb.Repo) + newr.Namespace = ns + + queryPB.AppendByNamespace(newr) + } + + return queryPB.SubmitReposPB(url) +} + +func (f *Forge) UpdatePB(check *gitpb.Repos) (*gitpb.Repos, error) { + url := f.forgeURL + "update" queryPB := gitpb.NewRepos() |
