diff options
author | Josh Bialkowski <josh.bialkowski@gmail.com> | 2019-12-18 07:49:49 -0800 |
---|---|---|
committer | Josh Bialkowski <josh.bialkowski@gmail.com> | 2019-12-18 12:18:47 -0800 |
commit | dca85b309a0a82e9993a345964d0831ab2876fb4 (patch) | |
tree | e5054a4d122c72a081766c3efd4470b396cf7c24 /bridge/jira/config.go | |
parent | 3384d1b26bea41224c260b1912c51e0564571422 (diff) | |
download | git-bug-dca85b309a0a82e9993a345964d0831ab2876fb4.tar.gz |
repair after rebase
Diffstat (limited to 'bridge/jira/config.go')
-rw-r--r-- | bridge/jira/config.go | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/bridge/jira/config.go b/bridge/jira/config.go index fc21111d..59076564 100644 --- a/bridge/jira/config.go +++ b/bridge/jira/config.go @@ -13,8 +13,8 @@ import ( "github.com/pkg/errors" "github.com/MichaelMure/git-bug/bridge/core" + "github.com/MichaelMure/git-bug/cache" "github.com/MichaelMure/git-bug/input" - "github.com/MichaelMure/git-bug/repository" ) const ( @@ -66,7 +66,7 @@ How would you like to store your JIRA login credentials? // Configure sets up the bridge configuration func (g *Jira) Configure( - repo repository.RepoCommon, params core.BridgeParams) ( + repo *cache.RepoCache, params core.BridgeParams) ( core.Configuration, error) { conf := make(core.Configuration) var err error @@ -77,11 +77,11 @@ func (g *Jira) Configure( var password string var serverURL string - if params.Token != "" || params.TokenStdin { - return nil, fmt.Errorf( - "JIRA session tokens are extremely short lived. We don't store them " + - "in the configuration, so they are not valid for this bridge.") - } + // if params.Token != "" || params.TokenStdin { + // return nil, fmt.Errorf( + // "JIRA session tokens are extremely short lived. We don't store them " + + // "in the configuration, so they are not valid for this bridge.") + // } if params.Owner != "" { return nil, fmt.Errorf("owner doesn't make sense for jira") @@ -137,7 +137,7 @@ func (g *Jira) Configure( return nil, err } - conf[core.KeyTarget] = target + conf[core.ConfigKeyTarget] = target conf[keyServer] = serverURL conf[keyProject] = project @@ -191,8 +191,8 @@ func (g *Jira) Configure( // ValidateConfig returns true if all required keys are present func (*Jira) ValidateConfig(conf core.Configuration) error { - if v, ok := conf[core.KeyTarget]; !ok { - return fmt.Errorf("missing %s key", core.KeyTarget) + if v, ok := conf[core.ConfigKeyTarget]; !ok { + return fmt.Errorf("missing %s key", core.ConfigKeyTarget) } else if v != target { return fmt.Errorf("unexpected target name: %v", v) } |