Skip to content
代码片段 群组 项目
提交 8243489a 编辑于 作者: Jan Provaznik's avatar Jan Provaznik
浏览文件

Merge branch '40841-dora-remove-redundant-methods' into 'master'

Remove methods from Dora::AggregateMetricsService

See merge request gitlab-org/gitlab!96016
No related branches found
No related tags found
无相关合并请求
......@@ -62,7 +62,7 @@ def validate
return error(_('The start date must be ealier than the end date.'), :bad_request)
end
if group_project_ids.present? && !group?
if group_project_ids.present? && !group_container?
return error(_('The group_project_ids parameter is only allowed for a group'), :bad_request)
end
......@@ -89,9 +89,9 @@ def environments
end
def target_projects
if project?
if project_container?
[container]
elsif group?
elsif group_container?
# The actor definitely has read permission in all subsequent projects of the group by the following reasons:
# - DORA metrics can be read by reporter (or above) at project-level.
# - With `read_dora4_analytics` permission check, we make sure that the
......@@ -105,14 +105,6 @@ def target_projects
end
end
def project?
container.is_a?(Project)
end
def group?
container.is_a?(Group)
end
def start_date
params[:start_date] || 3.months.ago.to_date
end
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册