Commit 11f5e7fe authored by Kamil Trzciński's avatar Kamil Trzciński

Merge branch 'fix-interruptible-scope-name' into 'master'

Fixes non interruptible scope name

See merge request gitlab-org/gitlab-ce!32940
parents c8a11c34 6be65320
...@@ -231,7 +231,7 @@ module Ci ...@@ -231,7 +231,7 @@ module Ci
where('EXISTS (?)', ::Ci::Build.latest.with_reports(reports_scope).where('ci_pipelines.id=ci_builds.commit_id').select(1)) where('EXISTS (?)', ::Ci::Build.latest.with_reports(reports_scope).where('ci_pipelines.id=ci_builds.commit_id').select(1))
end end
scope :without_interruptible_builds, -> do scope :with_only_interruptible_builds, -> do
where('NOT EXISTS (?)', where('NOT EXISTS (?)',
Ci::Build.where('ci_builds.commit_id = ci_pipelines.id') Ci::Build.where('ci_builds.commit_id = ci_pipelines.id')
.with_status(:running, :success, :failed) .with_status(:running, :success, :failed)
......
...@@ -101,7 +101,7 @@ module Ci ...@@ -101,7 +101,7 @@ module Ci
.where.not(id: pipeline.id) .where.not(id: pipeline.id)
.where.not(sha: project.commit(pipeline.ref).try(:id)) .where.not(sha: project.commit(pipeline.ref).try(:id))
.alive_or_scheduled .alive_or_scheduled
.without_interruptible_builds .with_only_interruptible_builds
else else
project.ci_pipelines project.ci_pipelines
.where(ref: pipeline.ref) .where(ref: pipeline.ref)
......
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