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-05-16 00:08:21 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-05-16 00:08:21 +0300
commit95ab36cd97f9f527ad624f80c6830eca28eeb7bf (patch)
treee9691cf3f4786201040268327a967b63b74ff0c0 /lib/gitlab/code_navigation_path.rb
parent31a340adabe75f8b02cca462ab8aa857ff62f772 (diff)
Add latest changes from gitlab-org/gitlab@master
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 c4f9407f7f0..57aeb6c4fb2 100644
--- a/lib/gitlab/code_navigation_path.rb
+++ b/lib/gitlab/code_navigation_path.rb
@@ -5,7 +5,6 @@ module Gitlab
include Gitlab::Utils::StrongMemoize
include Gitlab::Routing
- CODE_NAVIGATION_JOB_NAME = 'code_navigation'
LATEST_COMMITS_LIMIT = 10
def initialize(project, commit_sha)
@@ -17,7 +16,7 @@ module Gitlab
return if Feature.disabled?(:code_navigation, project)
return unless build
- raw_project_job_artifacts_path(project, build, path: "lsif/#{path}.json")
+ raw_project_job_artifacts_path(project, build, path: "lsif/#{path}.json", file_type: :lsif)
end
private
@@ -29,10 +28,11 @@ module Gitlab
latest_commits_shas =
project.repository.commits(commit_sha, limit: LATEST_COMMITS_LIMIT).map(&:sha)
- artifact = ::Ci::JobArtifact
- .for_sha(latest_commits_shas, project.id)
- .for_job_name(CODE_NAVIGATION_JOB_NAME)
- .last
+ artifact =
+ ::Ci::JobArtifact
+ .with_file_types(['lsif'])
+ .for_sha(latest_commits_shas, project.id)
+ .last
artifact&.job
end