1
0
mirror of https://github.com/interviewstreet/go-jira.git synced 2024-11-28 08:39:03 +02:00

Merge pull request #363 from asuffield/context

pass context parameters through
This commit is contained in:
Benji Vesterby 2021-03-16 15:31:04 -04:00 committed by GitHub
commit 1abf9e57d2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -857,7 +857,7 @@ func (s *IssueService) UpdateWithOptions(issue *Issue, opts *UpdateQueryOptions)
//
// Jira API docs: https://docs.atlassian.com/jira/REST/cloud/#api/2/issue-editIssue
func (s *IssueService) UpdateWithContext(ctx context.Context, issue *Issue) (*Issue, *Response, error) {
return s.UpdateWithOptions(issue, nil)
return s.UpdateWithOptionsWithContext(ctx, issue, nil)
}
// Update wraps UpdateWithContext using the background context.
@ -1119,7 +1119,7 @@ func (s *IssueService) SearchPagesWithContext(ctx context.Context, jql string, o
options.MaxResults = 50
}
issues, resp, err := s.Search(jql, options)
issues, resp, err := s.SearchWithContext(ctx, jql, options)
if err != nil {
return err
}
@ -1141,7 +1141,7 @@ func (s *IssueService) SearchPagesWithContext(ctx context.Context, jql string, o
}
options.StartAt += resp.MaxResults
issues, resp, err = s.Search(jql, options)
issues, resp, err = s.SearchWithContext(ctx, jql, options)
if err != nil {
return err
}