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:
Diffstat (limited to 'lib/gitlab/cache/ci/project_pipeline_status.rb')
-rw-r--r--lib/gitlab/cache/ci/project_pipeline_status.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/gitlab/cache/ci/project_pipeline_status.rb b/lib/gitlab/cache/ci/project_pipeline_status.rb
index 137f76bc96d..99ce1119c17 100644
--- a/lib/gitlab/cache/ci/project_pipeline_status.rb
+++ b/lib/gitlab/cache/ci/project_pipeline_status.rb
@@ -69,7 +69,7 @@ module Gitlab
self.sha = commit.sha
self.status = commit.status
- self.ref = project.default_branch
+ self.ref = project.repository.root_ref
end
# We only cache the status for the HEAD commit of a project
@@ -79,7 +79,7 @@ module Gitlab
return unless sha
return unless ref
- if commit.sha == sha && project.default_branch == ref
+ if commit.sha == sha && project.repository.root_ref == ref
store_in_cache
end
end