app/models/concerns/git.rb
Showing 5 of 5 total issues
Method run_mass_import
has a Cognitive Complexity of 45 (exceeds 5 allowed). Consider refactoring. Open
Open
def run_mass_import(url, srpms_list, visibility, owner, add_to_repository_id) doc = Nokogiri::HTML(open(url)) links = doc.css("a[href$='.src.rpm']") return if links.count == 0 filter = srpms_list.lines.map(&:chomp).map(&:strip).select(&:present?)
- Read upRead up
Method run_mass_import
has 58 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def run_mass_import(url, srpms_list, visibility, owner, add_to_repository_id) doc = Nokogiri::HTML(open(url)) links = doc.css("a[href$='.src.rpm']") return if links.count == 0 filter = srpms_list.lines.map(&:chomp).map(&:strip).select(&:present?)
Method process_hook
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def process_hook(owner_uname, repo, newrev, oldrev, ref, newrev_type, user = nil, message = nil)
Method fork_git_repo
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
Open
def fork_git_repo dummy = Grit::Repo.new(path) rescue nil # Do nothing if GIT repo already exist unless dummy if alias_from_id
- Read upRead up
Method run_mass_import
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def run_mass_import(url, srpms_list, visibility, owner, add_to_repository_id)