app/helpers/projects_helper.rb
Method projects_mr_chart_data
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def projects_mr_chart_data(project)
period = 20
first_day = period.days.ago
mrs = project.merge_requests.group('DATE(created_at)').where('created_at > ?', first_day).count
Method projects_merge_request_chart
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def projects_merge_request_chart(project, role, title)
query = project.merge_requests.joins(role).accepted.limit(100)
.select('users.name')
.order('merge_requests.created_at DESC').to_sql
db = ActiveRecord::Base.connection