MCPcopy Index your code
hub / github.com/git-bug/git-bug / Repository

Method Repository

api/graphql/resolvers/query.go:17–35  ·  view source on GitHub ↗
(_ context.Context, ref *string)

Source from the content-addressed store, hash-verified

15}
16
17func (r rootQueryResolver) Repository(_ context.Context, ref *string) (*models.Repository, error) {
18 var repo *cache.RepoCache
19 var err error
20
21 if ref == nil {
22 repo, err = r.cache.DefaultRepo()
23 } else {
24 repo, err = r.cache.ResolveRepo(*ref)
25 }
26
27 if err != nil {
28 return nil, err
29 }
30
31 return &models.Repository{
32 Cache: r.cache,
33 Repo: repo,
34 }, nil
35}

Callers

nothing calls this directly

Calls 2

DefaultRepoMethod · 0.80
ResolveRepoMethod · 0.80

Tested by

no test coverage detected