Skip to content
Snippets Groups Projects
Commit 761d7c3c authored by Mike Kozono's avatar Mike Kozono
Browse files

Merge branch 'add-update-sentry-api' into 'master'

Add Sentry Client HTTP PUT capability

See merge request !22230
parents 170332c3 2b015e40
No related branches found
No related tags found
2 merge requests!158514Fix CodeReviewMetrics worker failure with kwargs,!22230Add Sentry Client HTTP PUT capability
Pipeline #107350556 passed with warnings
......@@ -71,9 +71,22 @@ def request_params
end
def http_get(url, params = {})
response = handle_request_exceptions do
http_request do
Gitlab::HTTP.get(url, **request_params.merge(params))
end
end
def http_put(url, params = {})
http_request do
Gitlab::HTTP.put(url, **request_params.merge({ body: params }))
end
end
def http_request
response = handle_request_exceptions do
yield
end
handle_response(response)
end
......
......@@ -15,6 +15,10 @@ def get_issue(issue_id:)
http_get(issue_api_url(issue_id))[:body]
end
def update_issue(issue_id:, params:)
http_put(issue_api_url(issue_id), params)[:body]
end
def issue_api_url(issue_id)
issue_url = URI(url)
issue_url.path = "/api/0/issues/#{CGI.escape(issue_id.to_s)}/"
......
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