-
Notifications
You must be signed in to change notification settings - Fork 204
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add (broken) cii experiment #1385
Conversation
Todo * fix pg query syntax * double check render
@andrew would be good to understand what's happening with the db qry here. Tripping up on |
app/models/project.rb
Outdated
scope :digital_infrastructure, -> { not_removed | ||
.with_dependent_repos | ||
.with_repo | ||
.where('projects.dependent_repos_count DESC NULLS LAST').limit(1000)} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be .order, rather than .where at the start of this line
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
def unseen_infrastructure | ||
orginal_scope = Project.unsung_heroes | ||
scope = current_platform.present? ? orginal_scope.platform(current_platform) : orginal_scope | ||
@projects = scope.order('projects.dependent_repos_count DESC').paginate(page: page_number) | ||
@platforms = orginal_scope.group('projects.platform').count.reject{|k,_v| k.blank? }.sort_by{|_k,v| v }.reverse.first(20) | ||
@platforms = orginal_scope.group('projects.platform').count.reject{|k,_v|÷ k.blank? }.sort_by{|_k,v| v }.reverse.first(20) | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Weird percentage symbol on this line that needs to be removed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🥇
Tak! |
Todo