Skip to content

Commit 789886c

Browse files
colton22coryb
authored andcommitted
Forgot you use TAB instead of spaces
1 parent 8a46215 commit 789886c

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

issue.go

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -16,20 +16,20 @@ import (
1616

1717
type IssueQueryProvider interface {
1818
ProvideIssueQueryString() string
19-
ProvideDefaultProject() string
19+
ProvideDefaultProject() string
2020
}
2121

2222
type IssueOptions struct {
23-
Fields []string `json:"fields,omitempty" yaml:"fields,omitempty"`
24-
Expand []string `json:"expand,omitempty" yaml:"expand,omitempty"`
25-
Properties []string `json:"properties,omitempty" yaml:"properties,omitempty"`
26-
FieldsByKeys bool `json:"fieldsByKeys,omitempty" yaml:"fieldsByKeys,omitempty"`
27-
UpdateHistory bool `json:"updateHistory,omitempty" yaml:"updateHistory,omitempty"`
28-
Project string `json:"project,omitempty" yaml:"project,omitempty"`
23+
Fields []string `json:"fields,omitempty" yaml:"fields,omitempty"`
24+
Expand []string `json:"expand,omitempty" yaml:"expand,omitempty"`
25+
Properties []string `json:"properties,omitempty" yaml:"properties,omitempty"`
26+
FieldsByKeys bool `json:"fieldsByKeys,omitempty" yaml:"fieldsByKeys,omitempty"`
27+
UpdateHistory bool `json:"updateHistory,omitempty" yaml:"updateHistory,omitempty"`
28+
Project string `json:"project,omitempty" yaml:"project,omitempty"`
2929
}
3030

3131
func (o *IssueOptions) ProvideDefaultProject() string {
32-
return o.Project
32+
return o.Project
3333
}
3434

3535
func (o *IssueOptions) ProvideIssueQueryString() string {
@@ -56,8 +56,8 @@ func (o *IssueOptions) ProvideIssueQueryString() string {
5656
}
5757

5858
func CaseInsensitiveContains(s, substr string) bool {
59-
s, substr = strings.ToUpper(s), strings.ToUpper(substr)
60-
return strings.Contains(s, substr)
59+
s, substr = strings.ToUpper(s), strings.ToUpper(substr)
60+
return strings.Contains(s, substr)
6161
}
6262

6363
// https://docs.atlassian.com/jira/REST/cloud/#api/2/issue-getIssue
@@ -67,7 +67,7 @@ func (j *Jira) GetIssue(issue string, iqg IssueQueryProvider) (*jiradata.Issue,
6767

6868
func GetIssue(ua HttpClient, endpoint string, issue string, iqg IssueQueryProvider) (*jiradata.Issue, error) {
6969
query := ""
70-
pro := iqg.ProvideDefaultProject()
70+
pro := iqg.ProvideDefaultProject()
7171
if iqg != nil {
7272
query = iqg.ProvideIssueQueryString()
7373
}
@@ -83,11 +83,11 @@ func GetIssue(ua HttpClient, endpoint string, issue string, iqg IssueQueryProvid
8383
results := &jiradata.Issue{}
8484
return results, json.NewDecoder(resp.Body).Decode(results)
8585
}
86-
// Ticket not found, maybe try prepend Project value?
87-
if ! CaseInsensitiveContains(issue,pro) {
88-
issue = pro+"-"+issue
89-
return GetIssue(ua, endpoint, issue, iqg)
90-
}
86+
// Ticket not found, maybe try prepend Project value?
87+
if ! CaseInsensitiveContains(issue,pro) {
88+
issue = pro+"-"+issue
89+
return GetIssue(ua, endpoint, issue, iqg)
90+
}
9191
return nil, responseError(resp)
9292
}
9393

0 commit comments

Comments
 (0)