diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-04-02 00:09:22 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-04-02 00:09:22 +0300 |
commit | 1e0d9b713469904253f2452d8d34922d316a766a (patch) | |
tree | 11f46c168733068698e025bf440fc37afecb4bfc /app/models/commit_status.rb | |
parent | 1769b59b9fd05325e3016b1a53a82ae6cf56adb5 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/commit_status.rb')
-rw-r--r-- | app/models/commit_status.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/app/models/commit_status.rb b/app/models/commit_status.rb index e64380f5d91..fe262d48ac4 100644 --- a/app/models/commit_status.rb +++ b/app/models/commit_status.rb @@ -56,6 +56,7 @@ class CommitStatus < ApplicationRecord scope :by_name, -> (name) { where(name: name) } scope :in_pipelines, ->(pipelines) { where(pipeline: pipelines) } scope :eager_load_pipeline, -> { eager_load(:pipeline, project: { namespace: :route }) } + scope :with_pipeline, -> { joins(:pipeline) } scope :for_project_paths, -> (paths) do where(project: Project.where_full_path_in(Array(paths))) @@ -180,6 +181,7 @@ class CommitStatus < ApplicationRecord end after_transition any => :failed do |commit_status| + next if Feature.enabled?(:async_add_build_failure_todo, commit_status.project, default_enabled: :yaml) next unless commit_status.project # rubocop: disable CodeReuse/ServiceClass |