summaryrefslogtreecommitdiff
path: root/lib/hooks_utils.rb
blob: 67c45f3a7dde76af789e552e4847e3312d704334 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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