summaryrefslogtreecommitdiff
path: root/lib/api/helpers.rb
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2016-10-31 15:00:30 +0000
committerDouwe Maan <douwe@gitlab.com>2016-10-31 15:00:30 +0000
commit1ff00cb2dd168d98b0d4f4995216ed909dae9349 (patch)
treee25fe417a3a01e0bd73145475869a73e25c8a062 /lib/api/helpers.rb
parentdecf0fefe17a574782d47504920b9a2cfc7b14dc (diff)
parent490776517c394ced2780159fa3800e2accc27601 (diff)
downloadgitlab-ce-add-retry-limit-project-webhook.tar.gz
Merge branch 'master' into 'add-retry-limit-project-webhook'add-retry-limit-project-webhook
# Conflicts: # app/workers/project_web_hook_worker.rb
Diffstat (limited to 'lib/api/helpers.rb')
-rw-r--r--lib/api/helpers.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/api/helpers.rb b/lib/api/helpers.rb
index 45120898b76..8025581d3ca 100644
--- a/lib/api/helpers.rb
+++ b/lib/api/helpers.rb
@@ -6,6 +6,7 @@ module API
SUDO_PARAM = :sudo
def to_boolean(value)
+ return value if [true, false].include?(value)
return true if value =~ /^(true|t|yes|y|1|on)$/i
return false if value =~ /^(false|f|no|n|0|off)$/i