summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2018-10-22 11:37:52 +0200
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2018-10-22 11:37:52 +0200
commit5f412e3a87d1e9444bbef6475a2cd3304f541f7d (patch)
tree4e2218a691a3ccd08223174ddabbb0789a21623f /app
parent49d7c3b3461442a60d06a26c8cc971205afa3642 (diff)
downloadgitlab-ce-5f412e3a87d1e9444bbef6475a2cd3304f541f7d.tar.gz
Fix pipeline reference existence check and add specs
Diffstat (limited to 'app')
-rw-r--r--app/models/ci/pipeline.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/app/models/ci/pipeline.rb b/app/models/ci/pipeline.rb
index c53b14bd406..c93f0e0cd55 100644
--- a/app/models/ci/pipeline.rb
+++ b/app/models/ci/pipeline.rb
@@ -269,7 +269,7 @@ module Ci
end
def ref_exists?
- project.repository.ref_exists?(self.ref)
+ project.repository.ref_exists?(git_ref)
end
##
@@ -678,11 +678,11 @@ module Ci
def push_details
strong_memoize(:push_details) do
- Gitlab::Git::Push.new(project, before_sha, sha, push_ref)
+ Gitlab::Git::Push.new(project, before_sha, sha, git_ref)
end
end
- def push_ref
+ def git_ref
if branch?
Gitlab::Git::BRANCH_REF_PREFIX + ref.to_s
elsif tag?