Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-07-20 15:26:25 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-07-20 15:26:25 +0300
commita09983ae35713f5a2bbb100981116d31ce99826e (patch)
tree2ee2af7bd104d57086db360a7e6d8c9d5d43667a /lib/gitlab/code_navigation_path.rb
parent18c5ab32b738c0b6ecb4d0df3994000482f34bd8 (diff)
Add latest changes from gitlab-org/gitlab@13-2-stable-ee
Diffstat (limited to 'lib/gitlab/code_navigation_path.rb')
-rw-r--r--lib/gitlab/code_navigation_path.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/gitlab/code_navigation_path.rb b/lib/gitlab/code_navigation_path.rb
index faf623faccf..909d0536b5f 100644
--- a/lib/gitlab/code_navigation_path.rb
+++ b/lib/gitlab/code_navigation_path.rb
@@ -5,7 +5,7 @@ module Gitlab
include Gitlab::Utils::StrongMemoize
include Gitlab::Routing
- LATEST_COMMITS_LIMIT = 10
+ LATEST_COMMITS_LIMIT = 2
def initialize(project, commit_sha)
@project = project
@@ -28,11 +28,11 @@ module Gitlab
latest_commits_shas =
project.repository.commits(commit_sha, limit: LATEST_COMMITS_LIMIT).map(&:sha)
- artifact =
- ::Ci::JobArtifact
- .with_file_types(['lsif'])
- .for_sha(latest_commits_shas, project.id)
- .last
+ pipeline = @project.ci_pipelines.for_sha(latest_commits_shas).last
+
+ next unless pipeline
+
+ artifact = pipeline.job_artifacts.with_file_types(['lsif']).last
artifact&.job
end