Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions internal/config/generator.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ type JiraCLIConfig struct {
installation string
server string
login string
authType jira.AuthType
AuthType jira.AuthType
project *projectConf
board *jira.Board
epic *jira.Epic
Expand Down Expand Up @@ -249,12 +249,12 @@ func (c *JiraCLIConfig) verifyLoginDetails(server, login string) error {
Server: server,
Login: login,
Insecure: c.insecure,
AuthType: c.value.authType,
AuthType: c.value.AuthType,
Debug: viper.GetBool("debug"),
})
if ret, err := c.jiraClient.Me(); err != nil {
return err
} else if c.value.authType == jira.AuthTypeBearer {
} else if c.value.AuthType == jira.AuthTypeBearer {
login = ret.Login
}

Expand Down
6 changes: 3 additions & 3 deletions pkg/jira/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ type Client struct {
insecure bool
server string
login string
authType AuthType
AuthType AuthType
token string
timeout time.Duration
debug bool
Expand All @@ -122,7 +122,7 @@ func NewClient(c Config, opts ...ClientFunc) *Client {
server: strings.TrimSuffix(c.Server, "/"),
login: c.Login,
token: c.APIToken,
authType: c.AuthType,
AuthType: c.AuthType,
debug: c.Debug,
}

Expand Down Expand Up @@ -242,7 +242,7 @@ func (c *Client) request(ctx context.Context, method, endpoint string, body []by
req.Header.Set(k, v)
}

if c.authType == AuthTypeBearer {
if c.AuthType == AuthTypeBearer {
req.Header.Add("Authorization", "Bearer "+c.token)
} else {
req.SetBasicAuth(c.login, c.token)
Expand Down