rosa-abf/rosa-build

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

Summary

Maintainability
A
45 mins
Test Coverage

Showing 1 of 1 total issue

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

def add_project
if project = Project.where(id: params[:project_id]).first
if policy(project).read?
begin
@repository.projects << project
Severity: Minor
Found in app/controllers/api/v1/repositories_controller.rb - About 45 mins to fix
Category
Status