aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bridge/github/import.go2
-rw-r--r--commands/bridge_pull.go18
2 files changed, 15 insertions, 5 deletions
diff --git a/bridge/github/import.go b/bridge/github/import.go
index 1421dd96..092e3e71 100644
--- a/bridge/github/import.go
+++ b/bridge/github/import.go
@@ -104,7 +104,7 @@ func (gi *githubImporter) ImportAll(ctx context.Context, repo *cache.RepoCache,
}
}
- if err := gi.iterator.Error(); err != nil && err != context.Canceled {
+ if err := gi.iterator.Error(); err != nil {
gi.out <- core.NewImportError(err, "")
}
}()
diff --git a/commands/bridge_pull.go b/commands/bridge_pull.go
index bde434cd..692ec5e9 100644
--- a/commands/bridge_pull.go
+++ b/commands/bridge_pull.go
@@ -96,15 +96,25 @@ func runBridgePull(cmd *cobra.Command, args []string) error {
importedIssues := 0
importedIdentities := 0
for result := range events {
- if result.Event != core.ImportEventNothing {
- fmt.Println(result.String())
- }
-
switch result.Event {
+ case core.ImportEventNothing:
+ // filtered
+
case core.ImportEventBug:
importedIssues++
+ fmt.Println(result.String())
+
case core.ImportEventIdentity:
importedIdentities++
+ fmt.Println(result.String())
+
+ case core.ImportEventError:
+ if result.Err != context.Canceled {
+ fmt.Println(result.String())
+ }
+
+ default:
+ fmt.Println(result.String())
}
}