hugopl/reviewit

View on GitHub
app/helpers/projects_helper.rb

Summary

Maintainability
A
3 hrs
Test Coverage

Method projects_mr_chart_data has 46 lines of code (exceeds 25 allowed). Consider refactoring.
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

Severity: Minor
Found in app/helpers/projects_helper.rb - About 1 hr to fix

    Method projects_merge_request_chart has 39 lines of code (exceeds 25 allowed). Consider refactoring.
    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
    Severity: Minor
    Found in app/helpers/projects_helper.rb - About 1 hr to fix

      There are no issues that match your filters.

      Category
      Status