diff options
-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 } |