summaryrefslogtreecommitdiff
path: root/http.go
diff options
context:
space:
mode:
Diffstat (limited to 'http.go')
-rw-r--r--http.go24
1 files changed, 22 insertions, 2 deletions
diff --git a/http.go b/http.go
index fb65080..9d5fff0 100644
--- a/http.go
+++ b/http.go
@@ -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()