File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -89,7 +89,10 @@ def with_analysis
8989 activity_facts [ :on_trunk ] . eq ( true ) . and ( activity_facts [ :analysis_id ] . eq ( @analysis . id ) )
9090 end
9191
92+ # rubocop:disable Metrics/MethodLength
9293 def contributor_monthly_commits_query ( code_set_ids )
94+ return [ ] if code_set_ids . blank?
95+
9396 commit_name_ids = AnalysisAlias . where ( preferred_name_id : @name_id , analysis_id : @analysis . id ) . pluck ( :commit_name_id )
9497 sql = <<-SQL . squish
9598 select to_char(date(C.time),'MON,YYYY') as month, count (*) as count
@@ -101,4 +104,5 @@ def contributor_monthly_commits_query(code_set_ids)
101104 data = commit_name_ids . present? ? ApplicationRecord . connection . execute ( sql ) . try ( :to_json ) : commit_name_ids . to_s
102105 JSON . parse ( data )
103106 end
107+ # rubocop:enable Metrics/MethodLength
104108end
You can’t perform that action at this time.
0 commit comments