diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gitlab_net.rb | 4 | ||||
-rw-r--r-- | lib/gitlab_post_receive.rb | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/lib/gitlab_net.rb b/lib/gitlab_net.rb index a0e1f12..de262d8 100644 --- a/lib/gitlab_net.rb +++ b/lib/gitlab_net.rb @@ -119,12 +119,12 @@ class GitlabNet # rubocop:disable Metrics/ClassLength false end - def post_receive(gl_repository, identifier, changes, push_opts) + def post_receive(gl_repository, identifier, changes, push_options) params = { gl_repository: gl_repository, identifier: identifier, changes: changes, - :"push_opts[]" => push_opts, # ruby <2.2 syntax + :"push_options[]" => push_options, # ruby <2.2 syntax } resp = post("#{internal_api_endpoint}/post_receive", params) diff --git a/lib/gitlab_post_receive.rb b/lib/gitlab_post_receive.rb index 5dd9955..2d412b9 100644 --- a/lib/gitlab_post_receive.rb +++ b/lib/gitlab_post_receive.rb @@ -8,19 +8,19 @@ require 'securerandom' class GitlabPostReceive attr_reader :config, :gl_repository, :repo_path, :changes, :jid - def initialize(gl_repository, repo_path, actor, changes, push_opts) + def initialize(gl_repository, repo_path, actor, changes, push_options) @config = GitlabConfig.new @gl_repository = gl_repository @repo_path = repo_path.strip @actor = actor @changes = changes - @push_opts = push_opts + @push_options = push_options @jid = SecureRandom.hex(12) end def exec response = GitlabMetrics.measure("post-receive") do - api.post_receive(gl_repository, @actor, changes, @push_opts) + api.post_receive(gl_repository, @actor, changes, @push_options) end return false unless response |