diff options
author | Michael Muré <batolettre@gmail.com> | 2019-06-07 02:53:21 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-07 02:53:21 +0200 |
commit | d69dcce806d280ddbd6a4fb17700153bc03da90b (patch) | |
tree | da07a7beadc77b3fe5e99f09bd38d919566a0191 /bridge/core/bridge.go | |
parent | a9629dbad15f0e80ea244eb81abda4ddc08f7a0e (diff) | |
parent | 1c2ad95960c09d029e6306ac5a5ea76c58e8b5c9 (diff) | |
download | git-bug-d69dcce806d280ddbd6a4fb17700153bc03da90b.tar.gz |
Merge pull request #153 from A-Hilaly/bridge-configuration
[Breaking] Bridge configuration enhancements
Diffstat (limited to 'bridge/core/bridge.go')
-rw-r--r-- | bridge/core/bridge.go | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/bridge/core/bridge.go b/bridge/core/bridge.go index 42730bf6..3513b790 100644 --- a/bridge/core/bridge.go +++ b/bridge/core/bridge.go @@ -21,6 +21,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 { @@ -169,8 +178,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 } |