Skip to content
Closed
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 pkg/notify/notify.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
// TODO(bwplotka): Consider renaming this package to ticketer.

type jiraIssueService interface {
Search(jql string, options *jira.SearchOptions) ([]jira.Issue, *jira.Response, error)
SearchV2JQL(jql string, options *jira.SearchOptionsV2) ([]jira.Issue, *jira.Response, error)

Check failure on line 38 in pkg/notify/notify.go

View workflow job for this annotation

GitHub Actions / test

undefined: jira.SearchOptionsV2

Check failure on line 38 in pkg/notify/notify.go

View workflow job for this annotation

GitHub Actions / test

undefined: jira.SearchOptionsV2
GetTransitions(id string) ([]jira.Transition, *jira.Response, error)

Create(issue *jira.Issue) (*jira.Issue, *jira.Response, error)
Expand Down Expand Up @@ -330,13 +330,13 @@
// Search multiple projects in case issue was moved and further alert firings are desired in existing JIRA.
projectList := "'" + strings.Join(projects, "', '") + "'"
query := fmt.Sprintf("project in(%s) and labels=%q order by resolutiondate desc", projectList, issueLabel)
options := &jira.SearchOptions{
options := &jira.SearchOptionsV2{

Check failure on line 333 in pkg/notify/notify.go

View workflow job for this annotation

GitHub Actions / test

undefined: jira.SearchOptionsV2

Check failure on line 333 in pkg/notify/notify.go

View workflow job for this annotation

GitHub Actions / test

undefined: jira.SearchOptionsV2) (typecheck)
Fields: []string{"summary", "priority", "status", "resolution", "resolutiondate", "description", "comment"},
MaxResults: 2,
}

level.Debug(r.logger).Log("msg", "search", "query", query, "options", fmt.Sprintf("%+v", options))
issues, resp, err := r.client.Search(query, options)
issues, resp, err := r.client.SearchV2JQL(query, options)
if err != nil {
retry, err := handleJiraErrResponse("Issue.Search", resp, err, r.logger)
return nil, retry, err
Expand Down
2 changes: 1 addition & 1 deletion pkg/notify/notify_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
}
}

func (f *fakeJira) Search(jql string, options *jira.SearchOptions) ([]jira.Issue, *jira.Response, error) {
func (f *fakeJira) SearchV2JQL(jql string, options *jira.SearchOptionsV2) ([]jira.Issue, *jira.Response, error) {

Check failure on line 55 in pkg/notify/notify_test.go

View workflow job for this annotation

GitHub Actions / test

undefined: jira.SearchOptionsV2 (typecheck)
var issues []jira.Issue
for _, key := range f.keysByQuery[jql] {
issue := jira.Issue{Key: key, Fields: &jira.IssueFields{}}
Expand Down
Loading