aboutsummaryrefslogtreecommitdiffstats
path: root/commands
diff options
context:
space:
mode:
authorMichael Muré <batolettre@gmail.com>2019-12-09 01:03:37 +0100
committerMichael Muré <batolettre@gmail.com>2019-12-09 01:03:37 +0100
commit8f7f89561b59a0988d56bc41a30093730e35f70e (patch)
tree3c842c42c715d10e9a0b9eccb69dad62ba3683cf /commands
parent981a4a848b1329da1a73270e27633911f9298bb1 (diff)
downloadgit-bug-8f7f89561b59a0988d56bc41a30093730e35f70e.tar.gz
bridge: fix incorrect last import time on context cancel
Diffstat (limited to 'commands')
-rw-r--r--commands/bridge_pull.go18
1 files changed, 14 insertions, 4 deletions
diff --git a/commands/bridge_pull.go b/commands/bridge_pull.go
index 67f19024..2dd3d93e 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())
}
}