Commit ce8500b9 authored by GitLab Bot's avatar GitLab Bot

Add latest changes from gitlab-org/security/gitlab@13-11-stable-ee

parent bc299f54
......@@ -185,7 +185,7 @@ class Projects::BranchesController < Projects::ApplicationController
# Here we get one more branch to indicate if there are more data we're not showing
limit = @overview_max_branches + 1
if Feature.enabled?(:branch_list_keyset_pagination, project, default_enabled: true)
if Feature.enabled?(:branch_list_keyset_pagination, project, default_enabled: :yaml)
@active_branches =
BranchesFinder.new(@repository, { per_page: limit, sort: sort_value_recently_updated })
.execute(gitaly_pagination: true).select(&:active?)
......
......@@ -37,7 +37,7 @@ class Projects::BranchesByModeService
def use_gitaly_pagination?
return false if params[:page].present? || params[:search].present?
Feature.enabled?(:branch_list_keyset_pagination, project, default_enabled: true)
Feature.enabled?(:branch_list_keyset_pagination, project, default_enabled: :yaml)
end
def fetch_branches_via_offset_pagination
......
---
title: Disable keyset pagination for branches by default
merge_request:
author:
type: security
......@@ -5,4 +5,4 @@ rollout_issue_url:
milestone: '13.2'
type: development
group: group::source code
default_enabled: true
default_enabled: false
......@@ -26,11 +26,11 @@ module Gitlab
private
def keyset_pagination_enabled?
Feature.enabled?(:branch_list_keyset_pagination, project, default_enabled: true) && params[:pagination] == 'keyset'
Feature.enabled?(:branch_list_keyset_pagination, project, default_enabled: :yaml) && params[:pagination] == 'keyset'
end
def paginate_first_page?
Feature.enabled?(:branch_list_keyset_pagination, project, default_enabled: true) && (params[:page].blank? || params[:page].to_i == 1)
Feature.enabled?(:branch_list_keyset_pagination, project, default_enabled: :yaml) && (params[:page].blank? || params[:page].to_i == 1)
end
def paginate_via_gitaly(finder)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment