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/ci/input/arguments/required.rb')
-rw-r--r--lib/gitlab/ci/input/arguments/required.rb13
1 files changed, 11 insertions, 2 deletions
diff --git a/lib/gitlab/ci/input/arguments/required.rb b/lib/gitlab/ci/input/arguments/required.rb
index b4e218ed29e..2e39f548731 100644
--- a/lib/gitlab/ci/input/arguments/required.rb
+++ b/lib/gitlab/ci/input/arguments/required.rb
@@ -28,7 +28,7 @@ module Gitlab
# website:
# ```
#
- # An empty value, that has no specification is also considered as a "required" input, however we should
+ # An empty string value, that has no specification is also considered as a "required" input, however we should
# never see that being used, because it will be rejected by Ci::Config::Header validation.
#
# ```yaml
@@ -36,8 +36,17 @@ module Gitlab
# inputs:
# website: ""
# ```
+ #
+ # An empty hash value is also considered to be a required argument:
+ #
+ # ```yaml
+ # spec:
+ # inputs:
+ # website: {}
+ # ```
+ #
def self.matches?(spec)
- spec.to_s.empty?
+ spec.blank?
end
end
end