aboutsummaryrefslogtreecommitdiffstats
path: root/commands/bridge_push.go
diff options
context:
space:
mode:
authorAmine Hilaly <hilalyamine@gmail.com>2019-06-25 01:33:48 +0200
committerAmine Hilaly <hilalyamine@gmail.com>2019-06-30 15:42:45 +0200
commit1f365b236900d429cbfdaa1807163a110e6e4624 (patch)
tree4b38730093c7f617202f9e8727c851e2f0e86206 /commands/bridge_push.go
parent570ae5f75e034523a1d7d94a04febe944d36399b (diff)
downloadgit-bug-1f365b236900d429cbfdaa1807163a110e6e4624.tar.gz
[core] Implement ExportResults
Use ExportResult chan to send export events Remove exportedBugs and exportedLabels
Diffstat (limited to 'commands/bridge_push.go')
-rw-r--r--commands/bridge_push.go11
1 files changed, 10 insertions, 1 deletions
diff --git a/commands/bridge_push.go b/commands/bridge_push.go
index 8cae1684..11f5ca82 100644
--- a/commands/bridge_push.go
+++ b/commands/bridge_push.go
@@ -1,6 +1,7 @@
package commands
import (
+ "fmt"
"time"
"github.com/spf13/cobra"
@@ -32,11 +33,19 @@ func runBridgePush(cmd *cobra.Command, args []string) error {
}
// TODO: by default export only new events
- err = b.ExportAll(time.Time{})
+ out, err := b.ExportAll(time.Time{})
if err != nil {
return err
}
+ for result := range out {
+ if result.Err != nil {
+ fmt.Println(result.Err, result.Reason)
+ } else {
+ fmt.Printf("%s: %s\n", result.String(), result.ID)
+ }
+ }
+
return nil
}