has_many:commits,->(){order('CASE WHEN ci_commits.committed_at IS NULL THEN 0 ELSE 1 END',:committed_at,:id)},dependent: :destroy,class_name: 'Ci::Commit',foreign_key: :gl_project_id
has_many:ci_commits,->(){order('CASE WHEN ci_commits.committed_at IS NULL THEN 0 ELSE 1 END',:committed_at,:id)},dependent: :destroy,class_name: 'Ci::Commit',foreign_key: :gl_project_id