aboutsummaryrefslogtreecommitdiffstats
path: root/bridge/core/bridge.go
diff options
context:
space:
mode:
Diffstat (limited to 'bridge/core/bridge.go')
-rw-r--r--bridge/core/bridge.go13
1 files changed, 11 insertions, 2 deletions
diff --git a/bridge/core/bridge.go b/bridge/core/bridge.go
index aa02ceb5..6bc14bc7 100644
--- a/bridge/core/bridge.go
+++ b/bridge/core/bridge.go
@@ -20,6 +20,15 @@ const bridgeConfigKeyPrefix = "git-bug.bridge"
var bridgeImpl map[string]reflect.Type
+// BridgeParams holds parameters to simplify the bridge configuration without
+// having to make terminal prompts.
+type BridgeParams struct {
+ Owner string
+ Project string
+ URL string
+ Token string
+}
+
// Bridge is a wrapper around a BridgeImpl that will bind low-level
// implementation with utility code to provide high-level functions.
type Bridge struct {
@@ -166,8 +175,8 @@ func RemoveBridge(repo repository.RepoCommon, fullName string) error {
}
// Configure run the target specific configuration process
-func (b *Bridge) Configure() error {
- conf, err := b.impl.Configure(b.repo)
+func (b *Bridge) Configure(params BridgeParams) error {
+ conf, err := b.impl.Configure(b.repo, params)
if err != nil {
return err
}