Skip to content

Commit

Permalink
Ignore case for Jira deployment type
Browse files Browse the repository at this point in the history
  • Loading branch information
berlam committed Oct 4, 2019
1 parent b083f2f commit 1efcd60
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pkg/jira/jira.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (
"log"
"net/http"
"net/url"
"strings"
"sync"
"time"
)
Expand Down Expand Up @@ -38,13 +39,13 @@ func getApiVersion(client *http.Client, server *url.URL, userinfo *url.Userinfo)
return nil, fmt.Errorf(response.Status)
}

var result= serverInfo{}
var result = serverInfo{}
err = json.Unmarshal(data, &result)
if err != nil {
return nil, err
}
// There are "Cloud" and "Server" deployment types.
if result.DeploymentType == "Cloud" {
if strings.ToLower(result.DeploymentType) == "cloud" {
return &v3{
client: client,
server: server,
Expand Down

0 comments on commit 1efcd60

Please sign in to comment.