From d982f73f8ea23210f04fc91868e9cea90704540d Mon Sep 17 00:00:00 2001 From: Joachim Hill-Grannec Date: Tue, 19 Apr 2016 13:29:52 -0700 Subject: [PATCH] Must have a git username, password, consumer key, and consumer rsa --- remote/bitbucketserver/bitbucketserver.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/remote/bitbucketserver/bitbucketserver.go b/remote/bitbucketserver/bitbucketserver.go index 13d983d13..7b5312706 100644 --- a/remote/bitbucketserver/bitbucketserver.go +++ b/remote/bitbucketserver/bitbucketserver.go @@ -47,9 +47,21 @@ func Load(config string) *BitbucketServer{ bitbucketserver := BitbucketServer{} bitbucketserver.URL = url_.String() bitbucketserver.GitUserName = params.Get("git_username") + if bitbucketserver.GitUserName == "" { + log.FatalLevel("Must have a git_username") + } bitbucketserver.GitPassword = params.Get("git_password") + if bitbucketserver.GitPassword == "" { + log.FatalLevel("Must have a git_password") + } bitbucketserver.ConsumerKey = params.Get("consumer_key") + if bitbucketserver.ConsumerKey == "" { + log.FatalLevel("Must have a consumer_key") + } bitbucketserver.ConsumerRSA = params.Get("consumer_rsa") + if bitbucketserver.ConsumerRSA == "" { + log.FatalLevel("Must have a consumer_rsa") + } bitbucketserver.Open, _ = strconv.ParseBool(params.Get("open"))