Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
2b015e40
Commit
2b015e40
authored
Jan 06, 2020
by
Sean Arnold
Committed by
Michael Kozono
Jan 06, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add Sentry client http put
- Move sentry client http requests into new method
parent
170332c3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
1 deletion
+18
-1
lib/sentry/client.rb
lib/sentry/client.rb
+14
-1
lib/sentry/client/issue.rb
lib/sentry/client/issue.rb
+4
-0
No files found.
lib/sentry/client.rb
View file @
2b015e40
...
@@ -71,9 +71,22 @@ module Sentry
...
@@ -71,9 +71,22 @@ module Sentry
end
end
def
http_get
(
url
,
params
=
{})
def
http_get
(
url
,
params
=
{})
response
=
handle_request_exceptions
do
http_request
do
Gitlab
::
HTTP
.
get
(
url
,
**
request_params
.
merge
(
params
))
Gitlab
::
HTTP
.
get
(
url
,
**
request_params
.
merge
(
params
))
end
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
)
handle_response
(
response
)
end
end
...
...
lib/sentry/client/issue.rb
View file @
2b015e40
...
@@ -15,6 +15,10 @@ module Sentry
...
@@ -15,6 +15,10 @@ module Sentry
http_get
(
issue_api_url
(
issue_id
))[
:body
]
http_get
(
issue_api_url
(
issue_id
))[
:body
]
end
end
def
update_issue
(
issue_id
:,
params
:)
http_put
(
issue_api_url
(
issue_id
),
params
)[
:body
]
end
def
issue_api_url
(
issue_id
)
def
issue_api_url
(
issue_id
)
issue_url
=
URI
(
url
)
issue_url
=
URI
(
url
)
issue_url
.
path
=
"/api/0/issues/
#{
CGI
.
escape
(
issue_id
.
to_s
)
}
/"
issue_url
.
path
=
"/api/0/issues/
#{
CGI
.
escape
(
issue_id
.
to_s
)
}
/"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment