summaryrefslogtreecommitdiff
path: root/handleRepos.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-09-26 18:52:54 -0500
committerJeff Carr <[email protected]>2025-09-26 19:04:45 -0500
commitc0f7721f65e6f8baea33eb4b4975c11792063c57 (patch)
tree95edad6643b9064f318fc22e041577b203f2f40c /handleRepos.go
parente41cf6f043e3475c74b3376d80d2294d9a6e72df (diff)
make forged config come from /etcv0.0.52
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
+}