Skip to content
Snippets Groups Projects
Commit 19b6ce69 authored by Jonathon Reinhart's avatar Jonathon Reinhart
Browse files

Add lib/push_options

This module is responsible for converting the GIT_PUSH_OPTION_*
environment variables into an array.

See https://gitlab.com/gitlab-org/gitlab-ce/issues/18667
parent e358cf25
No related branches found
No related tags found
No related merge requests found
module GitPushOptions
# Gets an array of Git push options from the environment
def GitPushOptions.get_push_options
result = []
count = ENV['GIT_PUSH_OPTION_COUNT'].to_i
if count
count.times do |i|
result.push(ENV["GIT_PUSH_OPTION_#{i}"])
end
end
return result
end
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment