rosa-abf/rosa-build

View on GitHub
app/controllers/api/v1/issues_controller.rb

Summary

Maintainability
B
4 hrs
Test Coverage

Showing 3 of 3 total issues

Method render_issues_list has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
Open

def render_issues_list
@issues = @issues.preload(:user, :assignee, :labels, :project).without_pull_requests
if params[:status] == 'closed'
@issues = @issues.closed
else
Severity: Minor
Found in app/controllers/api/v1/issues_controller.rb - About 2 hrs to fix

Method render_issues_list has 39 lines of code (exceeds 25 allowed). Consider refactoring.
Open

def render_issues_list
@issues = @issues.preload(:user, :assignee, :labels, :project).without_pull_requests
if params[:status] == 'closed'
@issues = @issues.closed
else
Severity: Minor
Found in app/controllers/api/v1/issues_controller.rb - About 1 hr to fix

    Method update has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
    Open

    def update
    @issue.labelings.destroy_all if params[:update_labels] && policy(@project).write?
    if params[:issue] && status = params[:issue].delete(:status)
    @issue.set_close(current_user) if status == 'closed'
    @issue.set_open if status == 'open'
    Severity: Minor
    Found in app/controllers/api/v1/issues_controller.rb - About 45 mins to fix

    There are no issues that match your filters.

    Category
    Status