Skip to content
Snippets Groups Projects

Add auto-cancel for pending pipelines on branch, if they are not HEAD

Compare and
3 files
+ 15
0
Compare changes
  • Side-by-side
  • Inline
Files
3
+ 4
0
@@ -113,6 +113,10 @@ def self.total_duration
where.not(duration: nil).sum(:duration)
end
def pipelines_for_same_ref
+1
project.pipelines.where(ref: ref).where.not(id: id)
end
def stage(name)
stage = Ci::Stage.new(self, name: name)
stage unless stage.statuses_count.zero?
Loading