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

Method Init

bridge/github/import.go:33–49  ·  view source on GitHub ↗
(_ context.Context, repo *cache.RepoCache, conf core.Configuration)

Source from the content-addressed store, hash-verified

31}
32
33func (gi *githubImporter) Init(_ context.Context, repo *cache.RepoCache, conf core.Configuration) error {
34 gi.conf = conf
35 creds, err := auth.List(repo,
36 auth.WithTarget(target),
37 auth.WithKind(auth.KindToken),
38 auth.WithMeta(auth.MetaKeyLogin, conf[confKeyDefaultLogin]),
39 )
40 if err != nil {
41 return err
42 }
43 if len(creds) <= 0 {
44 return ErrMissingIdentityToken
45 }
46 gi.client = buildClient(creds[0].(*auth.Token))
47
48 return nil
49}
50
51// ImportAll iterate over all the configured repository issues and ensure the creation of the
52// missing issues / timeline items / edits / label events ...

Callers 2

TestGithubImporterFunction · 0.95
TestGithubPushPullFunction · 0.95

Calls 5

ListFunction · 0.92
WithTargetFunction · 0.92
WithKindFunction · 0.92
WithMetaFunction · 0.92
buildClientFunction · 0.70

Tested by 2

TestGithubImporterFunction · 0.76
TestGithubPushPullFunction · 0.76