summaryrefslogtreecommitdiff
path: root/app/services/ci/create_pipeline_service.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/services/ci/create_pipeline_service.rb')
-rw-r--r--app/services/ci/create_pipeline_service.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/services/ci/create_pipeline_service.rb b/app/services/ci/create_pipeline_service.rb
index 85df8bcff8c..92a8438ab2f 100644
--- a/app/services/ci/create_pipeline_service.rb
+++ b/app/services/ci/create_pipeline_service.rb
@@ -65,6 +65,7 @@ module Ci
end
end
+ # rubocop: disable CodeReuse/ActiveRecord
def auto_cancelable_pipelines
project.pipelines
.where(ref: pipeline.ref)
@@ -72,6 +73,7 @@ module Ci
.where.not(sha: project.commit(pipeline.ref).try(:id))
.created_or_pending
end
+ # rubocop: enable CodeReuse/ActiveRecord
def pipeline_created_counter
@pipeline_created_counter ||= Gitlab::Metrics
@@ -84,8 +86,10 @@ module Ci
end
end
+ # rubocop: disable CodeReuse/ActiveRecord
def related_merge_requests
pipeline.project.source_of_merge_requests.opened.where(source_branch: pipeline.ref)
end
+ # rubocop: enable CodeReuse/ActiveRecord
end
end