Class: BranchesFinder
Instance Attribute Summary
#next_cursor
Instance Method Summary
collapse
#initialize
Constructor Details
This class inherits a constructor from GitRefsFinder
Instance Method Details
#execute(gitaly_pagination: false) ⇒ Object
4
5
6
7
8
9
10
11
12
13
14
|
# File 'app/finders/branches_finder.rb', line 4
def execute(gitaly_pagination: false)
if && search.blank? && regex.blank?
repository.branches_sorted_by(sort, ).tap do |branches|
set_next_cursor(branches)
end
else
branches = repository.branches_sorted_by(sort)
branches = by_search(branches)
by_regex(branches)
end
end
|
#total ⇒ Object
16
17
18
|
# File 'app/finders/branches_finder.rb', line 16
def total
repository.branch_count
end
|