Must have a git username, password, consumer key, and consumer rsa
This commit is contained in:
parent
0a20d9c1d2
commit
d982f73f8e
1 changed files with 12 additions and 0 deletions
|
@ -47,9 +47,21 @@ func Load(config string) *BitbucketServer{
|
||||||
bitbucketserver := BitbucketServer{}
|
bitbucketserver := BitbucketServer{}
|
||||||
bitbucketserver.URL = url_.String()
|
bitbucketserver.URL = url_.String()
|
||||||
bitbucketserver.GitUserName = params.Get("git_username")
|
bitbucketserver.GitUserName = params.Get("git_username")
|
||||||
|
if bitbucketserver.GitUserName == "" {
|
||||||
|
log.FatalLevel("Must have a git_username")
|
||||||
|
}
|
||||||
bitbucketserver.GitPassword = params.Get("git_password")
|
bitbucketserver.GitPassword = params.Get("git_password")
|
||||||
|
if bitbucketserver.GitPassword == "" {
|
||||||
|
log.FatalLevel("Must have a git_password")
|
||||||
|
}
|
||||||
bitbucketserver.ConsumerKey = params.Get("consumer_key")
|
bitbucketserver.ConsumerKey = params.Get("consumer_key")
|
||||||
|
if bitbucketserver.ConsumerKey == "" {
|
||||||
|
log.FatalLevel("Must have a consumer_key")
|
||||||
|
}
|
||||||
bitbucketserver.ConsumerRSA = params.Get("consumer_rsa")
|
bitbucketserver.ConsumerRSA = params.Get("consumer_rsa")
|
||||||
|
if bitbucketserver.ConsumerRSA == "" {
|
||||||
|
log.FatalLevel("Must have a consumer_rsa")
|
||||||
|
}
|
||||||
|
|
||||||
bitbucketserver.Open, _ = strconv.ParseBool(params.Get("open"))
|
bitbucketserver.Open, _ = strconv.ParseBool(params.Get("open"))
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue