diff options
Diffstat (limited to 'bridge/github')
-rw-r--r-- | bridge/github/export.go | 6 | ||||
-rw-r--r-- | bridge/github/import_integration_test.go | 3 | ||||
-rw-r--r-- | bridge/github/import_test.go | 6 |
3 files changed, 8 insertions, 7 deletions
diff --git a/bridge/github/export.go b/bridge/github/export.go index 6f882637..8cea9314 100644 --- a/bridge/github/export.go +++ b/bridge/github/export.go @@ -595,7 +595,7 @@ func (ge *githubExporter) createGithubLabelV4(gc *githubv4.Client, label, labelC } */ -func (ge *githubExporter) getOrCreateGithubLabelID(ctx context.Context, gc *rateLimitHandlerClient, repositoryID string, label bug.Label) (string, error) { +func (ge *githubExporter) getOrCreateGithubLabelID(ctx context.Context, gc *rateLimitHandlerClient, repositoryID string, label common.Label) (string, error) { // try to get label id from cache labelID, err := ge.getLabelID(string(label)) if err == nil { @@ -617,7 +617,7 @@ func (ge *githubExporter) getOrCreateGithubLabelID(ctx context.Context, gc *rate return labelID, nil } -func (ge *githubExporter) getLabelsIDs(ctx context.Context, gc *rateLimitHandlerClient, repositoryID string, labels []bug.Label) ([]githubv4.ID, error) { +func (ge *githubExporter) getLabelsIDs(ctx context.Context, gc *rateLimitHandlerClient, repositoryID string, labels []common.Label) ([]githubv4.ID, error) { ids := make([]githubv4.ID, 0, len(labels)) var err error @@ -744,7 +744,7 @@ func (ge *githubExporter) updateGithubIssueTitle(ctx context.Context, gc *rateLi } // update github issue labels -func (ge *githubExporter) updateGithubIssueLabels(ctx context.Context, gc *rateLimitHandlerClient, labelableID string, added, removed []bug.Label) error { +func (ge *githubExporter) updateGithubIssueLabels(ctx context.Context, gc *rateLimitHandlerClient, labelableID string, added, removed []common.Label) error { wg, ctx := errgroup.WithContext(ctx) if len(added) > 0 { diff --git a/bridge/github/import_integration_test.go b/bridge/github/import_integration_test.go index a642d374..365427e1 100644 --- a/bridge/github/import_integration_test.go +++ b/bridge/github/import_integration_test.go @@ -14,6 +14,7 @@ import ( "github.com/git-bug/git-bug/bridge/github/mocks" "github.com/git-bug/git-bug/cache" "github.com/git-bug/git-bug/entities/bug" + "github.com/git-bug/git-bug/entities/common" "github.com/git-bug/git-bug/repository" "github.com/git-bug/git-bug/util/interrupt" ) @@ -64,7 +65,7 @@ func TestGithubImporterIntegration(t *testing.T) { ops3 := b3.Snapshot().Operations require.Equal(t, "issue 3 comment 1", ops3[1].(*bug.AddCommentOperation).Message) require.Equal(t, "issue 3 comment 2", ops3[2].(*bug.AddCommentOperation).Message) - require.Equal(t, []bug.Label{"bug"}, ops3[3].(*bug.LabelChangeOperation).Added) + require.Equal(t, []common.Label{"bug"}, ops3[3].(*bug.LabelChangeOperation).Added) require.Equal(t, "title 3, edit 1", ops3[4].(*bug.SetTitleOperation).Title) b4, err := backend.Bugs().ResolveBugCreateMetadata(metaKeyGithubUrl, "https://github.com/marcus/to-himself/issues/4") diff --git a/bridge/github/import_test.go b/bridge/github/import_test.go index 80be5116..3d583c36 100644 --- a/bridge/github/import_test.go +++ b/bridge/github/import_test.go @@ -72,9 +72,9 @@ func TestGithubImporter(t *testing.T) { bug: &bug.Snapshot{ Operations: []dag.Operation{ bug.NewCreateOp(author, 0, "complex issue", "initial comment", nil), - bug.NewLabelChangeOperation(author, 0, []bug.Label{"bug"}, []bug.Label{}), - bug.NewLabelChangeOperation(author, 0, []bug.Label{"duplicate"}, []bug.Label{}), - bug.NewLabelChangeOperation(author, 0, []bug.Label{}, []bug.Label{"duplicate"}), + bug.NewLabelChangeOperation(author, 0, []common.Label{"bug"}, []common.Label{}), + bug.NewLabelChangeOperation(author, 0, []common.Label{"duplicate"}, []common.Label{}), + bug.NewLabelChangeOperation(author, 0, []common.Label{}, []common.Label{"duplicate"}), bug.NewAddCommentOp(author, 0, strings.Join([]string{ "### header", "**bold**", |