Commit 294d5f8e authored by Jaime Martinez's avatar Jaime Martinez

Do not validate ref for release

parent f42a3f1b
......@@ -42,13 +42,6 @@ module Gitlab
errors.add(:released_at, "must be a valid datetime")
end
end
validate do
next unless config[:ref]
unless Commit.reference_valid?(config[:ref])
errors.add(:ref, "must be a valid ref")
end
end
end
def value
......
......@@ -192,12 +192,6 @@ RSpec.describe Gitlab::Ci::Config::Entry::Release do
it_behaves_like 'reports error', 'release released at must be a valid datetime'
end
context 'when `ref` is not valid' do
let(:config) { { ref: 'ABC123' } }
it_behaves_like 'reports error', 'release ref must be a valid ref'
end
context 'when `milestones` is not an array of strings' do
let(:config) { { milestones: [1, 2, 3] } }
......@@ -210,12 +204,6 @@ RSpec.describe Gitlab::Ci::Config::Entry::Release do
it_behaves_like 'reports error', 'release released at must be a valid datetime'
end
context 'when `ref` is not valid' do
let(:config) { { ref: 'ABC123' } }
it_behaves_like 'reports error', 'release ref must be a valid ref'
end
context 'when `milestones` is not an array of strings' do
let(:config) { { milestones: [1, 2, 3] } }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment