diff options
author | Michael Muré <batolettre@gmail.com> | 2019-12-09 01:03:37 +0100 |
---|---|---|
committer | Michael Muré <batolettre@gmail.com> | 2019-12-09 01:03:37 +0100 |
commit | 8f7f89561b59a0988d56bc41a30093730e35f70e (patch) | |
tree | 3c842c42c715d10e9a0b9eccb69dad62ba3683cf /commands | |
parent | 981a4a848b1329da1a73270e27633911f9298bb1 (diff) | |
download | git-bug-8f7f89561b59a0988d56bc41a30093730e35f70e.tar.gz |
bridge: fix incorrect last import time on context cancel
Diffstat (limited to 'commands')
-rw-r--r-- | commands/bridge_pull.go | 18 |
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()) } } |