summaryrefslogtreecommitdiff
path: root/handleRepos.go
diff options
context:
space:
mode:
Diffstat (limited to 'handleRepos.go')
-rw-r--r--handleRepos.go24
1 files changed, 20 insertions, 4 deletions
diff --git a/handleRepos.go b/handleRepos.go
index bf49a46..34f04f5 100644
--- a/handleRepos.go
+++ b/handleRepos.go
@@ -51,11 +51,27 @@ func addRequest(pb *gitpb.Repos, reqPB *httppb.HttpRequest) *gitpb.Repos {
if found := me.forge.Repos.FindByNamespace(repo.Namespace); found != nil {
// already know about this namespace
continue
+ } else {
+ newReposPB.Append(found)
}
- newrepo := new(gitpb.Repo)
- newrepo.Namespace = repo.Namespace
- newrepo.URL = repo.URL
- newReposPB.Append(newrepo)
+ /*
+ newrepo := new(gitpb.Repo)
+ newrepo.Namespace = repo.Namespace
+ newrepo.URL = repo.URL
+ */
}
return newReposPB
}
+
+func checkRequest(pb *gitpb.Repos, reqPB *httppb.HttpRequest) *gitpb.Repos {
+ checkPB := gitpb.NewRepos()
+ for repo := range pb.IterAll() {
+ found := me.forge.Repos.FindByNamespace(repo.Namespace)
+ if found == nil {
+ // don't know about this
+ continue
+ }
+ checkPB.Append(found)
+ }
+ return checkPB
+}