rosa-abf/rosa-build

View on GitHub
app/controllers/platforms/repositories_controller.rb

Summary

Maintainability
A
2 hrs
Test Coverage

Showing 2 of 2 total issues

Method projects_list has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
Open

def projects_list
render(text: @repository.projects.map(&:name).join("\n")) && return if params[:text] == 'true'
 
owner_subquery = "
INNER JOIN (
Severity: Minor
Found in app/controllers/platforms/repositories_controller.rb - About 1 hr to fix

Method add_project has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Open

def add_project
authorize @repository
if projects_list = params.try(:[], :repository).try(:[], :projects_list)
@repository.add_projects projects_list, current_user
redirect_to platform_repository_path(@platform, @repository), notice: t('flash.repository.projects_will_be_added')
Severity: Minor
Found in app/controllers/platforms/repositories_controller.rb - About 55 mins to fix

There are no issues that match your filters.

Category
Status