debian-mirror-gitlab/app/services/projects/open_merge_requests_count_service.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

16 lines
372 B
Ruby
Raw Normal View History

2018-11-18 11:00:15 +05:30
# frozen_string_literal: true
2018-03-17 18:26:18 +05:30
module Projects
# Service class for counting and caching the number of open merge requests of
# a project.
class OpenMergeRequestsCountService < Projects::CountService
def cache_key_name
'open_merge_requests_count'
end
2023-05-27 22:25:52 +05:30
def self.query(project_ids)
MergeRequest.opened.of_projects(project_ids)
end
2018-03-17 18:26:18 +05:30
end
end