Optimize protected_branches
We have two versions for this
time_period = { created_at: 28.days.ago..Time.current }
protected_branches: distinct_count(::Project.with_protected_branches.where(time_period), :creator_id)
time_period = { }
protected_branches: distinct_count(::Project.with_protected_branches.where(time_period), :creator_id)
Edited by Alper Akgun