Class: TagsFinder

Inherits:
GitRefsFinder show all
Defined in:
app/finders/tags_finder.rb

Instance Method Summary collapse

Methods inherited from GitRefsFinder

#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
15
16
17
# File 'app/finders/tags_finder.rb', line 4

def execute(gitaly_pagination: false)
  tags = if gitaly_pagination && search.blank?
           repository.tags_sorted_by(sort, pagination_params)
         else
           repository.tags_sorted_by(sort)
         end

  by_search(tags)

rescue ArgumentError => e
  raise Gitlab::Git::InvalidPageToken, "Invalid page token: #{page_token}" if e.message.include?('page token')

  raise
end

#totalObject



19
20
21
# File 'app/finders/tags_finder.rb', line 19

def total
  repository.tag_count
end