diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-10-20 08:43:02 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-10-20 08:43:02 +0000 |
commit | d9ab72d6080f594d0b3cae15f14b3ef2c6c638cb (patch) | |
tree | 2341ef426af70ad1e289c38036737e04b0aa5007 /app/services/error_tracking | |
parent | d6e514dd13db8947884cd58fe2a9c2a063400a9b (diff) | |
download | gitlab-ce-d9ab72d6080f594d0b3cae15f14b3ef2c6c638cb.tar.gz |
Add latest changes from gitlab-org/gitlab@14-4-stable-eev14.4.0-rc42
Diffstat (limited to 'app/services/error_tracking')
-rw-r--r-- | app/services/error_tracking/list_issues_service.rb | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/app/services/error_tracking/list_issues_service.rb b/app/services/error_tracking/list_issues_service.rb index 86c7791e759..1979816b88d 100644 --- a/app/services/error_tracking/list_issues_service.rb +++ b/app/services/error_tracking/list_issues_service.rb @@ -76,16 +76,21 @@ module ErrorTracking filter_opts = { status: opts[:issue_status], sort: opts[:sort], - limit: opts[:limit] + limit: opts[:limit], + cursor: opts[:cursor] } errors = ErrorTracking::ErrorsFinder.new(current_user, project, filter_opts).execute + pagination = {} + pagination[:next] = { cursor: errors.cursor_for_next_page } if errors.has_next_page? + pagination[:previous] = { cursor: errors.cursor_for_previous_page } if errors.has_previous_page? + # We use the same response format as project_error_tracking_setting # method below for compatibility with existing code. { issues: errors.map(&:to_sentry_error), - pagination: {} + pagination: pagination } else project_error_tracking_setting.list_sentry_issues(**opts) |