diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-03-31 21:09:19 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-03-31 21:09:19 +0300 |
commit | 676109e1b32682bdbdd94a9ffbd8743784f35521 (patch) | |
tree | 71f0394c68455c1736a14c215992de6aa5fe358c /app/models/commit_status.rb | |
parent | 5facc34f44ce8736078127a5df174a7b52d922b4 (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 | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/app/models/commit_status.rb b/app/models/commit_status.rb index 9b08ca3718e..e64380f5d91 100644 --- a/app/models/commit_status.rb +++ b/app/models/commit_status.rb @@ -55,6 +55,7 @@ class CommitStatus < ApplicationRecord scope :for_ref, -> (ref) { where(ref: ref) } 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 :for_project_paths, -> (paths) do where(project: Project.where_full_path_in(Array(paths))) |