summaryrefslogtreecommitdiff
path: root/app/helpers/ci_variables_helper.rb
diff options
context:
space:
mode:
authorMatija Čupić <matteeyah@gmail.com>2019-06-04 17:36:40 +0200
committermfluharty <mfluharty@gitlab.com>2019-06-06 15:46:45 +0100
commit432d24ac9a84700ed5d1d798f705c2a1e40903dd (patch)
tree25ae5f3a035927e5673f2d89f04d97037e360f02 /app/helpers/ci_variables_helper.rb
parentff3486a92bfcf00b85d45c9224c27cc5fa9c49e2 (diff)
downloadgitlab-ce-432d24ac9a84700ed5d1d798f705c2a1e40903dd.tar.gz
Expose javascript regex
Diffstat (limited to 'app/helpers/ci_variables_helper.rb')
-rw-r--r--app/helpers/ci_variables_helper.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/helpers/ci_variables_helper.rb b/app/helpers/ci_variables_helper.rb
index e313015c937..3f01ed5669e 100644
--- a/app/helpers/ci_variables_helper.rb
+++ b/app/helpers/ci_variables_helper.rb
@@ -27,4 +27,8 @@ module CiVariablesHelper
%w(File file)
]
end
+
+ def ci_variable_maskable_regex
+ Maskable::REGEX.inspect.sub('\\A', '^').sub('\\z', '$').sub(/^\//, '').sub(/\/[a-z]*$/, '')
+ end
end