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-13 15:07:54 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-05-13 15:07:54 +0300
commit41e8b05e8d06f4b13a984e4a3ad26e9a48294543 (patch)
tree833a6ca2518dab3923f0ffbc760d9ba241cab196 /lib/gitlab/code_navigation_path.rb
parent0e65189f85bb393e16e60335a42933beb0834295 (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.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/gitlab/code_navigation_path.rb b/lib/gitlab/code_navigation_path.rb
index 8dd2e9cb1bb..c4f9407f7f0 100644
--- a/lib/gitlab/code_navigation_path.rb
+++ b/lib/gitlab/code_navigation_path.rb
@@ -6,6 +6,7 @@ module Gitlab
include Gitlab::Routing
CODE_NAVIGATION_JOB_NAME = 'code_navigation'
+ LATEST_COMMITS_LIMIT = 10
def initialize(project, commit_sha)
@project = project
@@ -25,8 +26,11 @@ module Gitlab
def build
strong_memoize(:build) do
+ latest_commits_shas =
+ project.repository.commits(commit_sha, limit: LATEST_COMMITS_LIMIT).map(&:sha)
+
artifact = ::Ci::JobArtifact
- .for_sha(commit_sha, project.id)
+ .for_sha(latest_commits_shas, project.id)
.for_job_name(CODE_NAVIGATION_JOB_NAME)
.last