Welcome to mirror list, hosted at ThFree Co, Russian Federation.

all_merge_requests_count_service.rb « projects « services « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: db0bab3f7990914cb32fa5599004aa4b03a951b3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# frozen_string_literal: true

module Projects
  # Service class for counting and caching the number of all merge requests of
  # a project.
  class AllMergeRequestsCountService < Projects::CountService
    def relation_for_count
      @project.merge_requests
    end

    def cache_key_name
      'all_merge_requests_count'
    end
  end
end