summaryrefslogtreecommitdiff
path: root/http.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-07-07 18:52:02 -0500
committerJeff Carr <[email protected]>2025-07-07 18:52:02 -0500
commit34a10367c5b425dd998d8fcc33f94428044c7599 (patch)
treee51d212480a7ba9096bf4bb6e258046c210c3d3c /http.go
parentdea10e2150ca2d879a9ef30f136698217a0415b2 (diff)
work on generic Clone()v0.0.111
Diffstat (limited to 'http.go')
-rw-r--r--http.go22
1 files changed, 21 insertions, 1 deletions
diff --git a/http.go b/http.go
index 33f50bf..fb65080 100644
--- a/http.go
+++ b/http.go
@@ -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)
+}