MCPcopy Create free account
hub / github.com/OpenCSGs/csghub-server / GetPublicRepos

Method GetPublicRepos

component/collection.go:142–150  ·  view source on GitHub ↗

get non private repositories of the collection

(collection types.Collection)

Source from the content-addressed store, hash-verified

140
141// get non private repositories of the collection
142func (cc *CollectionComponent) GetPublicRepos(collection types.Collection) []types.CollectionRepository {
143 var filtered []types.CollectionRepository
144 for _, repo := range collection.Repositories {
145 if !repo.Private {
146 filtered = append(filtered, repo)
147 }
148 }
149 return filtered
150}
151
152func (cc *CollectionComponent) UpdateCollection(ctx context.Context, input types.CreateCollectionReq) (*database.Collection, error) {
153 collection, err := cc.cs.GetCollection(ctx, input.ID)

Callers 1

GetCollectionMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected