diff options
author | Amine Hilaly <hilalyamine@gmail.com> | 2019-06-17 00:08:02 +0200 |
---|---|---|
committer | Amine Hilaly <hilalyamine@gmail.com> | 2019-06-17 00:08:02 +0200 |
commit | 041dc08d4306fe28770be172f057819f325af9a5 (patch) | |
tree | 12fb9e8a7ae39d17745dca4f2ffbe0ce6d98a74f /bridge | |
parent | 319b648d0f2d30c457c56df860dcecf89c80157a (diff) | |
download | git-bug-041dc08d4306fe28770be172f057819f325af9a5.tar.gz |
add target to launchpad configuration
Diffstat (limited to 'bridge')
-rw-r--r-- | bridge/launchpad/config.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/bridge/launchpad/config.go b/bridge/launchpad/config.go index d8efea46..c02fd16d 100644 --- a/bridge/launchpad/config.go +++ b/bridge/launchpad/config.go @@ -17,7 +17,9 @@ import ( var ErrBadProjectURL = errors.New("bad Launchpad project URL") const ( + target = "launchpad-preview" keyProject = "project" + keyTarget = "target" defaultTimeout = 60 * time.Second ) @@ -61,6 +63,7 @@ func (*Launchpad) Configure(repo repository.RepoCommon, params core.BridgeParams } conf[keyProject] = project + conf[keyTarget] = target return conf, nil } @@ -69,6 +72,10 @@ func (*Launchpad) ValidateConfig(conf core.Configuration) error { return fmt.Errorf("missing %s key", keyProject) } + if _, ok := conf[keyTarget]; !ok { + return fmt.Errorf("missing %s key", keyTarget) + } + return nil } |