Commit 82f9c1c4 authored by Greg Stark's avatar Greg Stark

add rubocop whitelist

parent d21f4130
...@@ -60,7 +60,7 @@ module Ci ...@@ -60,7 +60,7 @@ module Ci
new = Ci::Build.select(:id).where(%q[(artifacts_file IS NULL OR artifacts_file = '') AND EXISTS (?)], new = Ci::Build.select(:id).where(%q[(artifacts_file IS NULL OR artifacts_file = '') AND EXISTS (?)],
Ci::JobArtifact.select(1).where('ci_builds.id = ci_job_artifacts.job_id')) Ci::JobArtifact.select(1).where('ci_builds.id = ci_job_artifacts.job_id'))
union = Gitlab::SQL::Union.new([old, new], remove_duplicates: false) union = Gitlab::SQL::Union.new([old, new], remove_duplicates: false)
where(%Q[ci_builds.id IN (#{union.to_sql})]) where(%Q[ci_builds.id IN (#{union.to_sql})]) # rubocop:disable GitlabSecurity/SqlInjection
end end
scope :with_artifacts_not_expired, ->() do scope :with_artifacts_not_expired, ->() do
...@@ -68,7 +68,7 @@ module Ci ...@@ -68,7 +68,7 @@ module Ci
new = Ci::Build.select(:id).where(%q[(artifacts_file IS NULL OR artifacts_file = '') AND EXISTS (?)], new = Ci::Build.select(:id).where(%q[(artifacts_file IS NULL OR artifacts_file = '') AND EXISTS (?)],
Ci::JobArtifact.select(1).where('ci_builds.id = ci_job_artifacts.job_id AND (expire_at IS NULL OR expire_at > ?)', Time.now)) Ci::JobArtifact.select(1).where('ci_builds.id = ci_job_artifacts.job_id AND (expire_at IS NULL OR expire_at > ?)', Time.now))
union = Gitlab::SQL::Union.new([old, new], remove_duplicates: false) union = Gitlab::SQL::Union.new([old, new], remove_duplicates: false)
where(%Q[ci_builds.id IN (#{union.to_sql})]) where(%Q[ci_builds.id IN (#{union.to_sql})]) # rubocop:disable GitlabSecurity/SqlInjection
end end
scope :with_expired_artifacts, ->() do scope :with_expired_artifacts, ->() do
...@@ -76,7 +76,7 @@ module Ci ...@@ -76,7 +76,7 @@ module Ci
new = Ci::Build.select(:id).where(%q[(artifacts_file IS NULL OR artifacts_file = '') AND EXISTS (?)], new = Ci::Build.select(:id).where(%q[(artifacts_file IS NULL OR artifacts_file = '') AND EXISTS (?)],
Ci::JobArtifact.select(1).where('ci_builds.id = ci_job_artifacts.job_id AND expire_at < ?', Time.now)) Ci::JobArtifact.select(1).where('ci_builds.id = ci_job_artifacts.job_id AND expire_at < ?', Time.now))
union = Gitlab::SQL::Union.new([old, new], remove_duplicates: false) union = Gitlab::SQL::Union.new([old, new], remove_duplicates: false)
where(%Q[ci_builds.id IN (#{union.to_sql})]) where(%Q[ci_builds.id IN (#{union.to_sql})]) # rubocop:disable GitlabSecurity/SqlInjection
end end
scope :last_month, ->() { where('created_at > ?', Date.today - 1.month) } scope :last_month, ->() { where('created_at > ?', Date.today - 1.month) }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment