提交 38823e3e 编写于 作者: D Douwe Maan

Merge branch 'optimize-project-ci-services' into 'master'

Optimize Project#ci_service(s)

Related issue: gitlab-org/gitlab-ce#14186

See merge request !3158
......@@ -528,11 +528,11 @@ class Project < ActiveRecord::Base
end
def ci_services
services.select { |service| service.category == :ci }
services.where(category: :ci)
end
def ci_service
@ci_service ||= ci_services.find(&:activated?)
@ci_service ||= ci_services.reorder(nil).find_by(active: true)
end
def jira_tracker?
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册