diff options
| author | Jeff Carr <[email protected]> | 2025-07-07 18:52:02 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-07-07 18:52:02 -0500 |
| commit | 34a10367c5b425dd998d8fcc33f94428044c7599 (patch) | |
| tree | e51d212480a7ba9096bf4bb6e258046c210c3d3c /http.go | |
| parent | dea10e2150ca2d879a9ef30f136698217a0415b2 (diff) | |
work on generic Clone()v0.0.111
Diffstat (limited to 'http.go')
| -rw-r--r-- | http.go | 22 |
1 files changed, 21 insertions, 1 deletions
@@ -41,7 +41,7 @@ func (f *Forge) HttpPost(url string, data []byte) ([]byte, error) { return body, nil } -func (f *Forge) LookupPB(check *gitpb.Repos) (*gitpb.Repos, error) { +func (f *Forge) LookupPBorig(check *gitpb.Repos) (*gitpb.Repos, error) { url := forgeURL + "lookup" for repo := range check.IterByFullPath() { @@ -52,3 +52,23 @@ func (f *Forge) LookupPB(check *gitpb.Repos) (*gitpb.Repos, error) { return check.SubmitReposPB(url) } + +func (f *Forge) LookupPB(check *gitpb.Repos) (*gitpb.Repos, error) { + url := 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) +} |
