diff options
Diffstat (limited to 'app/controllers/projects/compare_controller.rb')
-rw-r--r-- | app/controllers/projects/compare_controller.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/app/controllers/projects/compare_controller.rb b/app/controllers/projects/compare_controller.rb index 221bc16e256..28a87f83451 100644 --- a/app/controllers/projects/compare_controller.rb +++ b/app/controllers/projects/compare_controller.rb @@ -26,6 +26,10 @@ class Projects::CompareController < Projects::ApplicationController feature_category :source_code_management + # Diffs may be pretty chunky, the less is better in this endpoint. + # Pagination design guides: https://design.gitlab.com/components/pagination/#behavior + COMMIT_DIFFS_PER_PAGE = 20 + def index end @@ -132,7 +136,7 @@ class Projects::CompareController < Projects::ApplicationController if compare environment_params = source_project.repository.branch_exists?(head_ref) ? { ref: head_ref } : { commit: compare.commit } environment_params[:find_latest] = true - @environment = EnvironmentsByDeploymentsFinder.new(source_project, current_user, environment_params).execute.last + @environment = ::Environments::EnvironmentsByDeploymentsFinder.new(source_project, current_user, environment_params).execute.last end end |