aboutsummaryrefslogtreecommitdiffstats
path: root/bridge/github
diff options
context:
space:
mode:
Diffstat (limited to 'bridge/github')
-rw-r--r--bridge/github/export.go2
-rw-r--r--bridge/github/export_test.go7
-rw-r--r--bridge/github/import.go2
-rw-r--r--bridge/github/import_test.go5
4 files changed, 9 insertions, 7 deletions
diff --git a/bridge/github/export.go b/bridge/github/export.go
index 6cee4188..12b62fa6 100644
--- a/bridge/github/export.go
+++ b/bridge/github/export.go
@@ -53,7 +53,7 @@ type githubExporter struct {
}
// Init .
-func (ge *githubExporter) Init(repo *cache.RepoCache, conf core.Configuration) error {
+func (ge *githubExporter) Init(_ context.Context, repo *cache.RepoCache, conf core.Configuration) error {
ge.conf = conf
ge.identityClient = make(map[entity.Id]*githubv4.Client)
ge.cachedOperationIDs = make(map[entity.Id]string)
diff --git a/bridge/github/export_test.go b/bridge/github/export_test.go
index a25d56d7..acbd657a 100644
--- a/bridge/github/export_test.go
+++ b/bridge/github/export_test.go
@@ -185,15 +185,16 @@ func TestPushPull(t *testing.T) {
return deleteRepository(projectName, envUser, envToken)
})
+ ctx := context.Background()
+
// initialize exporter
exporter := &githubExporter{}
- err = exporter.Init(backend, core.Configuration{
+ err = exporter.Init(ctx, backend, core.Configuration{
confKeyOwner: envUser,
confKeyProject: projectName,
})
require.NoError(t, err)
- ctx := context.Background()
start := time.Now()
// export all bugs
@@ -215,7 +216,7 @@ func TestPushPull(t *testing.T) {
require.NoError(t, err)
importer := &githubImporter{}
- err = importer.Init(backend, core.Configuration{
+ err = importer.Init(ctx, backend, core.Configuration{
confKeyOwner: envUser,
confKeyProject: projectName,
})
diff --git a/bridge/github/import.go b/bridge/github/import.go
index 3267c013..b30be73a 100644
--- a/bridge/github/import.go
+++ b/bridge/github/import.go
@@ -29,7 +29,7 @@ type githubImporter struct {
out chan<- core.ImportResult
}
-func (gi *githubImporter) Init(repo *cache.RepoCache, conf core.Configuration) error {
+func (gi *githubImporter) Init(_ context.Context, repo *cache.RepoCache, conf core.Configuration) error {
gi.conf = conf
creds, err := auth.List(repo, auth.WithTarget(target), auth.WithKind(auth.KindToken))
diff --git a/bridge/github/import_test.go b/bridge/github/import_test.go
index 4f75f368..20b1b71e 100644
--- a/bridge/github/import_test.go
+++ b/bridge/github/import_test.go
@@ -149,14 +149,15 @@ func Test_Importer(t *testing.T) {
err = auth.Store(repo, token)
require.NoError(t, err)
+ ctx := context.Background()
+
importer := &githubImporter{}
- err = importer.Init(backend, core.Configuration{
+ err = importer.Init(ctx, backend, core.Configuration{
confKeyOwner: "MichaelMure",
confKeyProject: "git-bug-test-github-bridge",
})
require.NoError(t, err)
- ctx := context.Background()
start := time.Now()
events, err := importer.ImportAll(ctx, backend, time.Time{})