diff --git a/app/workers/repo_checks_worker.rb b/app/workers/repo_checks_worker.rb index 2bebeb4b..4532daa2 100644 --- a/app/workers/repo_checks_worker.rb +++ b/app/workers/repo_checks_worker.rb @@ -52,7 +52,7 @@ def repo_summary def detect_languages repo = Rugged::Repository.new(path) project = Linguist::Repository.new(repo, repo.head.target_id) - ordered_languages = project.languages.sort_by { |_, size| size }.reverse.first(3) + ordered_languages = project.languages.sort_by { |_, size| size }.reverse top_3 = ordered_languages.first(3).map {|l,s| l} label_issue(top_3) unless top_3.empty? end