aboutsummaryrefslogtreecommitdiffstats
path: root/commands
diff options
context:
space:
mode:
authorMichael Muré <batolettre@gmail.com>2019-11-26 20:46:00 +0100
committerMichael Muré <batolettre@gmail.com>2019-11-26 20:46:00 +0100
commit1a1e313f3028243680c29520d96f722092a2bd38 (patch)
treea85ca33f431caa2bb06ad1dc1a77965ce9fa1feb /commands
parent4f856d6f78f8ffe1795a71195244e5a332ac3215 (diff)
downloadgit-bug-1a1e313f3028243680c29520d96f722092a2bd38.tar.gz
bridge: move export event handling to the CLI
Diffstat (limited to 'commands')
-rw-r--r--commands/bridge_push.go16
1 files changed, 15 insertions, 1 deletions
diff --git a/commands/bridge_push.go b/commands/bridge_push.go
index 26f42dc4..95ad5f5e 100644
--- a/commands/bridge_push.go
+++ b/commands/bridge_push.go
@@ -63,11 +63,25 @@ func runBridgePush(cmd *cobra.Command, args []string) error {
return nil
})
- err = b.ExportAll(ctx, time.Time{})
+ events, err := b.ExportAll(ctx, time.Time{})
if err != nil {
return err
}
+ exportedIssues := 0
+ for result := range events {
+ if result.Event != core.ExportEventNothing {
+ fmt.Println(result.String())
+ }
+
+ switch result.Event {
+ case core.ExportEventBug:
+ exportedIssues++
+ }
+ }
+
+ fmt.Printf("exported %d issues with %s bridge\n", exportedIssues, b.Name)
+
// send done signal
close(done)
return nil