Use Gitlab::Git instead of Ci::Git
This commit is contained in:
parent
1c0683da7b
commit
c9ac38a074
|
@ -53,7 +53,7 @@ module Ci
|
|||
end
|
||||
|
||||
def valid_commit_sha
|
||||
if self.sha == Ci::Git::BLANK_SHA
|
||||
if self.sha == Gitlab::Git::BLANK_SHA
|
||||
self.errors.add(:sha, " cant be 00000000 (branch removal)")
|
||||
end
|
||||
end
|
||||
|
|
|
@ -9,14 +9,14 @@ class CreateCommitBuildsService
|
|||
return false
|
||||
end
|
||||
|
||||
ref = origin_ref.gsub(/\Arefs\/(tags|heads)\//, '')
|
||||
ref = Gitlab::Git.ref_name(origin_ref)
|
||||
|
||||
# Skip branch removal
|
||||
if sha == Ci::Git::BLANK_SHA
|
||||
if sha == Gitlab::Git::BLANK_SHA
|
||||
return false
|
||||
end
|
||||
|
||||
tag = origin_ref.start_with?('refs/tags/')
|
||||
tag = Gitlab::Git.tag_ref?(origin_ref)
|
||||
commit = project.ensure_ci_commit(sha)
|
||||
unless commit.skip_ci?
|
||||
commit.update_committed!
|
||||
|
|
|
@ -1,5 +0,0 @@
|
|||
module Ci
|
||||
module Git
|
||||
BLANK_SHA = '0' * 40
|
||||
end
|
||||
end
|
Loading…
Reference in New Issue