diff options
Diffstat (limited to 'lib/hooks_utils.rb')
-rw-r--r-- | lib/hooks_utils.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/hooks_utils.rb b/lib/hooks_utils.rb new file mode 100644 index 0000000..67c45f3 --- /dev/null +++ b/lib/hooks_utils.rb @@ -0,0 +1,15 @@ +module HooksUtils + extend self + + # Gets an array of Git push options from the environment + def get_push_options + count = ENV['GIT_PUSH_OPTION_COUNT'].to_i + result = [] + + count.times do |i| + result.push(ENV["GIT_PUSH_OPTION_#{i}"]) + end + + result + end +end |