aboutsummaryrefslogtreecommitdiffstats
path: root/bridge/launchpad
diff options
context:
space:
mode:
authorAmine Hilaly <hilalyamine@gmail.com>2019-06-17 00:08:02 +0200
committerAmine Hilaly <hilalyamine@gmail.com>2019-06-17 00:08:02 +0200
commit041dc08d4306fe28770be172f057819f325af9a5 (patch)
tree12fb9e8a7ae39d17745dca4f2ffbe0ce6d98a74f /bridge/launchpad
parent319b648d0f2d30c457c56df860dcecf89c80157a (diff)
downloadgit-bug-041dc08d4306fe28770be172f057819f325af9a5.tar.gz
add target to launchpad configuration
Diffstat (limited to 'bridge/launchpad')
-rw-r--r--bridge/launchpad/config.go7
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
}