Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add names of response #465

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
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
9 changes: 5 additions & 4 deletions issue.go
Original file line number Diff line number Diff line change
Expand Up @@ -530,10 +530,11 @@ type SearchOptions struct {
// searchResult is only a small wrapper around the Search (with JQL) method
// to be able to parse the results
type searchResult struct {
Issues []Issue `json:"issues" structs:"issues"`
StartAt int `json:"startAt" structs:"startAt"`
MaxResults int `json:"maxResults" structs:"maxResults"`
Total int `json:"total" structs:"total"`
Issues []Issue `json:"issues" structs:"issues"`
StartAt int `json:"startAt" structs:"startAt"`
MaxResults int `json:"maxResults" structs:"maxResults"`
Total int `json:"total" structs:"total"`
Names map[string]string `json:"names" structs:"names"`
}

// GetQueryOptions specifies the optional parameters for the Get Issue methods
Expand Down
2 changes: 2 additions & 0 deletions jira.go
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,7 @@ type Response struct {
StartAt int
MaxResults int
Total int
Names map[string]string
}

func newResponse(r *http.Response, v interface{}) *Response {
Expand All @@ -343,6 +344,7 @@ func (r *Response) populatePageValues(v interface{}) {
r.StartAt = value.StartAt
r.MaxResults = value.MaxResults
r.Total = value.Total
r.Names = value.Names
case *groupMembersResult:
r.StartAt = value.StartAt
r.MaxResults = value.MaxResults
Expand Down