diff options
Diffstat (limited to 'app/models/commit_status.rb')
-rw-r--r-- | app/models/commit_status.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/models/commit_status.rb b/app/models/commit_status.rb index b65d7672973..fe2f144ef03 100644 --- a/app/models/commit_status.rb +++ b/app/models/commit_status.rb @@ -58,9 +58,11 @@ class CommitStatus < ActiveRecord::Base # These are pages deployments and external statuses. # before_create unless: :importing? do + # rubocop: disable CodeReuse/ServiceClass Ci::EnsureStageService.new(project, user).execute(self) do |stage| self.run_after_commit { StageUpdateWorker.perform_async(stage.id) } end + # rubocop: enable CodeReuse/ServiceClass end state_machine :status do @@ -130,10 +132,12 @@ class CommitStatus < ActiveRecord::Base after_transition any => :failed do |commit_status| next unless commit_status.project + # rubocop: disable CodeReuse/ServiceClass commit_status.run_after_commit do MergeRequests::AddTodoWhenBuildFailsService .new(project, nil).execute(self) end + # rubocop: enable CodeReuse/ServiceClass end end |