diff options
Diffstat (limited to 'ruby/gitlab-shell/lib/gitlab_net.rb')
-rw-r--r-- | ruby/gitlab-shell/lib/gitlab_net.rb | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/ruby/gitlab-shell/lib/gitlab_net.rb b/ruby/gitlab-shell/lib/gitlab_net.rb index 74996e712..812be9ae8 100644 --- a/ruby/gitlab-shell/lib/gitlab_net.rb +++ b/ruby/gitlab-shell/lib/gitlab_net.rb @@ -41,40 +41,10 @@ class GitlabNet # rubocop:disable Metrics/ClassLength GitAccessStatus.new(false, resp.code, API_INACCESSIBLE_MESSAGE) end - def broadcast_message - resp = get("#{internal_api_endpoint}/broadcast_message") - JSON.parse(resp.body) rescue {} - end - - def merge_request_urls(gl_repository, repo_path, changes) - changes = changes.join("\n") unless changes.is_a?(String) - changes = changes.encode('UTF-8', 'ASCII', invalid: :replace, replace: '') - url = "#{internal_api_endpoint}/merge_request_urls?project=#{URI.escape(repo_path)}&changes=#{URI.escape(changes)}" - url += "&gl_repository=#{URI.escape(gl_repository)}" if gl_repository - resp = get(url) - - if resp.code == '200' - JSON.parse(resp.body) - else - [] - end - rescue - [] - end - def check get("#{internal_api_endpoint}/check", options: { read_timeout: CHECK_TIMEOUT }) end - def notify_post_receive(gl_repository, repo_path) - params = { gl_repository: gl_repository, project: repo_path } - resp = post("#{internal_api_endpoint}/notify_post_receive", params) - - resp.code == '200' - rescue - false - end - def post_receive(gl_repository, gl_id, changes, push_options) params = { gl_repository: gl_repository, |