fix: remove single quotes around JIRA user assignee and add debug printing
This commit is contained in:
parent
703f4bbdda
commit
3f922ddb35
1 changed files with 3 additions and 2 deletions
|
|
@ -44,10 +44,10 @@ func GetIssues(instance, user, from, to string) ([]Issue, error) {
|
||||||
return nil, fmt.Errorf("error building jira search request: %w", err)
|
return nil, fmt.Errorf("error building jira search request: %w", err)
|
||||||
}
|
}
|
||||||
q := req.URL.Query()
|
q := req.URL.Query()
|
||||||
q.Add("jql", fmt.Sprintf("assignee was '%s' and resolved >= %s and resolved <= %s", user, from, to))
|
q.Add("jql", fmt.Sprintf("assignee was %s and resolved >= %s and resolved <= %s", user, from, to))
|
||||||
q.Add("fields", "*all")
|
q.Add("fields", "*all")
|
||||||
req.URL.RawQuery = q.Encode()
|
req.URL.RawQuery = q.Encode()
|
||||||
req.SetBasicAuth(os.Getenv("JIRA_USER"), os.Getenv("JIRA_TOKEN"))
|
req.SetBasicAuth(user, os.Getenv("JIRA_TOKEN"))
|
||||||
req.Header.Add("Accept", "application/json")
|
req.Header.Add("Accept", "application/json")
|
||||||
resp, err := jcl.Do(req)
|
resp, err := jcl.Do(req)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
@ -66,6 +66,7 @@ func GetIssues(instance, user, from, to string) ([]Issue, error) {
|
||||||
out := []Issue{}
|
out := []Issue{}
|
||||||
|
|
||||||
for _, i := range jsr.Issues {
|
for _, i := range jsr.Issues {
|
||||||
|
fmt.Println(i)
|
||||||
iss := Issue{}
|
iss := Issue{}
|
||||||
if s, ok := i.Fields["summary"]; ok {
|
if s, ok := i.Fields["summary"]; ok {
|
||||||
fmt.Println(s)
|
fmt.Println(s)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue