{"action":"created","comment":{"url":"https://api.github.com/repos/openshift/prometheus-alert-buffer-client-ruby/pulls/comments/149407975","pull_request_review_id":74795438,"id":149407975,"diff_hunk":"@@ -49,14 +49,17 @@ def initialize(options = {})\n       # @option options [String] :generation_id Database generation Id.\n       # @option options [Integer] :from_index Minimal index of alerts to fetch.\n       #\n+      # @return [Hash] response with keys: generationID, messages\n       # All alerts will be fetched if options are omitted.\n       def get(options = {})\n         response = @client.get do |req|\n           req.params['generationID'] = options[:generation_id]\n           req.params['fromIndex'] = options[:from_index]\n         end\n \n-        JSON.parse(response.body)['messages']\n+        JSON.parse(response.body)\n+      rescue\n+        raise RequestError, 'Bad response from server'","path":"lib/prometheus/alert_buffer_client/client.rb","position":15,"original_position":15,"commit_id":"1bf49ecfe36107ee0222fb73343a17f9b834ac2a","original_commit_id":"7f78ff6e1e8867b2307b20300f9ebd4129c5ff7d","user":{"login":"moolitayer","id":3010449,"avatar_url":"https://avatars1.githubusercontent.com/u/3010449?v=4","gravatar_id":"","url":"https://api.github.com/users/moolitayer","html_url":"https://github.com/moolitayer","followers_url":"https://api.github.com/users/moolitayer/followers","following_url":"https://api.github.com/users/moolitayer/following{/other_user}","gists_url":"https://api.github.com/users/moolitayer/gists{/gist_id}","starred_url":"https://api.github.com/users/moolitayer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moolitayer/subscriptions","organizations_url":"https://api.github.com/users/moolitayer/orgs","repos_url":"https://api.github.com/users/moolitayer/repos","events_url":"https://api.github.com/users/moolitayer/events{/privacy}","received_events_url":"https://api.github.com/users/moolitayer/received_events","type":"User","site_admin":false},"body":"Yes","created_at":"2017-11-07T15:41:34Z","updated_at":"2017-11-07T15:41:34Z","html_url":"https://github.com/openshift/prometheus-alert-buffer-client-ruby/pull/2#discussion_r149407975","pull_request_url":"https://api.github.com/repos/openshift/prometheus-alert-buffer-client-ruby/pulls/2","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/openshift/prometheus-alert-buffer-client-ruby/pulls/comments/149407975"},"html":{"href":"https://github.com/openshift/prometheus-alert-buffer-client-ruby/pull/2#discussion_r149407975"},"pull_request":{"href":"https://api.github.com/repos/openshift/prometheus-alert-buffer-client-ruby/pulls/2"}},"in_reply_to_id":149369691},"pull_request":{"url":"https://api.github.com/repos/openshift/prometheus-alert-buffer-client-ruby/pulls/2","id":151101720,"html_url":"https://github.com/openshift/prometheus-alert-buffer-client-ruby/pull/2","diff_url":"https://github.com/openshift/prometheus-alert-buffer-client-ruby/pull/2.diff","patch_url":"https://github.com/openshift/prometheus-alert-buffer-client-ruby/pull/2.patch","issue_url":"https://api.github.com/repos/openshift/prometheus-alert-buffer-client-ruby/issues/2","number":2,"state":"open","locked":false,"title":"Change .get() return value to entire http response body","user":{"login":"zgalor","id":20948594,"avatar_url":"https://avatars3.githubusercontent.com/u/20948594?v=4","gravatar_id":"","url":"https://api.github.com/users/zgalor","html_url":"https://github.com/zgalor","followers_url":"https://api.github.com/users/zgalor/followers","following_url":"https://api.github.com/users/zgalor/following{/other_user}","gists_url":"https://api.github.com/users/zgalor/gists{/gist_id}","starred_url":"https://api.github.com/users/zgalor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zgalor/subscriptions","organizations_url":"https://api.github.com/users/zgalor/orgs","repos_url":"https://api.github.com/users/zgalor/repos","events_url":"https://api.github.com/users/zgalor/events{/privacy}","received_events_url":"https://api.github.com/users/zgalor/received_events","type":"User","site_admin":false},"body":"Extend get return value to a hash that also includes 'generationID', in addition to previously returned 'messages'","created_at":"2017-11-07T12:34:13Z","updated_at":"2017-11-07T15:41:34Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c6a1922471d30d798da7e62b62421df14d4148bb","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/openshift/prometheus-alert-buffer-client-ruby/pulls/2/commits","review_comments_url":"https://api.github.com/repos/openshift/prometheus-alert-buffer-client-ruby/pulls/2/comments","review_comment_url":"https://api.github.com/repos/openshift/prometheus-alert-buffer-client-ruby/pulls/comments{/number}","comments_url":"https://api.github.com/repos/openshift/prometheus-alert-buffer-client-ruby/issues/2/comments","statuses_url":"https://api.github.com/repos/openshift/prometheus-alert-buffer-client-ruby/statuses/1bf49ecfe36107ee0222fb73343a17f9b834ac2a","head":{"label":"zgalor:return_gen_id","ref":"return_gen_id","sha":"1bf49ecfe36107ee0222fb73343a17f9b834ac2a","user":{"login":"zgalor","id":20948594,"avatar_url":"https://avatars3.githubusercontent.com/u/20948594?v=4","gravatar_id":"","url":"https://api.github.com/users/zgalor","html_url":"https://github.com/zgalor","followers_url":"https://api.github.com/users/zgalor/followers","following_url":"https://api.github.com/users/zgalor/following{/other_user}","gists_url":"https://api.github.com/users/zgalor/gists{/gist_id}","starred_url":"https://api.github.com/users/zgalor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zgalor/subscriptions","organizations_url":"https://api.github.com/users/zgalor/orgs","repos_url":"https://api.github.com/users/zgalor/repos","events_url":"https://api.github.com/users/zgalor/events{/privacy}","received_events_url":"https://api.github.com/users/zgalor/received_events","type":"User","site_admin":false},"repo":{"id":99558379,"name":"prometheus-alert-buffer-client-ruby","full_name":"zgalor/prometheus-alert-buffer-client-ruby","owner":{"login":"zgalor","id":20948594,"avatar_url":"https://avatars3.githubusercontent.com/u/20948594?v=4","gravatar_id":"","url":"https://api.github.com/users/zgalor","html_url":"https://github.com/zgalor","followers_url":"https://api.github.com/users/zgalor/followers","following_url":"https://api.github.com/users/zgalor/following{/other_user}","gists_url":"https://api.github.com/users/zgalor/gists{/gist_id}","starred_url":"https://api.github.com/users/zgalor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zgalor/subscriptions","organizations_url":"https://api.github.com/users/zgalor/orgs","repos_url":"https://api.github.com/users/zgalor/repos","events_url":"https://api.github.com/users/zgalor/events{/privacy}","received_events_url":"https://api.github.com/users/zgalor/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/zgalor/prometheus-alert-buffer-client-ruby","description":null,"fork":true,"url":"https://api.github.com/repos/zgalor/prometheus-alert-buffer-client-ruby","forks_url":"https://api.github.com/repos/zgalor/prometheus-alert-buffer-client-ruby/forks","keys_url":"https://api.github.com/repos/zgalor/prometheus-alert-buffer-client-ruby/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zgalor/prometheus-alert-buffer-client-ruby/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zgalor/prometheus-alert-buffer-client-ruby/teams","hooks_url":"https://api.github.com/repos/zgalor/prometheus-alert-buffer-client-ruby/hooks","issue_events_url":"https://api.github.com/repos/zgalor/prometheus-alert-buffer-client-ruby/issues/events{/number}","events_url":"https://api.github.com/repos/zgalor/prometheus-alert-buffer-client-ruby/events","assignees_url":"https://api.github.com/repos/zgalor/prometheus-alert-buffer-client-ruby/assignees{/user}","branches_url":"https://api.github.com/repos/zgalor/prometheus-alert-buffer-client-ruby/branches{/branch}","tags_url":"https://api.github.com/repos/zgalor/prometheus-alert-buffer-client-ruby/tags","blobs_url":"https://api.github.com/repos/zgalor/prometheus-alert-buffer-client-ruby/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zgalor/prometheus-alert-buffer-client-ruby/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zgalor/prometheus-alert-buffer-client-ruby/git/refs{/sha}","trees_url":"https://api.github.com/repos/zgalor/prometheus-alert-buffer-client-ruby/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zgalor/prometheus-alert-buffer-client-ruby/statuses/{sha}","languages_url":"https://api.github.com/repos/zgalor/prometheus-alert-buffer-client-ruby/languages","stargazers_url":"https://api.github.com/repos/zgalor/prometheus-alert-buffer-client-ruby/stargazers","contributors_url":"https://api.github.com/repos/zgalor/prometheus-alert-buffer-client-ruby/contributors","subscribers_url":"https://api.github.com/repos/zgalor/prometheus-alert-buffer-client-ruby/subscribers","subscription_url":"https://api.github.com/repos/zgalor/prometheus-alert-buffer-client-ruby/subscription","commits_url":"https://api.github.com/repos/zgalor/prometheus-alert-buffer-client-ruby/commits{/sha}","git_commits_url":"https://api.github.com/repos/zgalor/prometheus-alert-buffer-client-ruby/git/commits{/sha}","comments_url":"https://api.github.com/repos/zgalor/prometheus-alert-buffer-client-ruby/comments{/number}","issue_comment_url":"https://api.github.com/repos/zgalor/prometheus-alert-buffer-client-ruby/issues/comments{/number}","contents_url":"https://api.github.com/repos/zgalor/prometheus-alert-buffer-client-ruby/contents/{+path}","compare_url":"https://api.github.com/repos/zgalor/prometheus-alert-buffer-client-ruby/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zgalor/prometheus-alert-buffer-client-ruby/merges","archive_url":"https://api.github.com/repos/zgalor/prometheus-alert-buffer-client-ruby/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zgalor/prometheus-alert-buffer-client-ruby/downloads","issues_url":"https://api.github.com/repos/zgalor/prometheus-alert-buffer-client-ruby/issues{/number}","pulls_url":"https://api.github.com/repos/zgalor/prometheus-alert-buffer-client-ruby/pulls{/number}","milestones_url":"https://api.github.com/repos/zgalor/prometheus-alert-buffer-client-ruby/milestones{/number}","notifications_url":"https://api.github.com/repos/zgalor/prometheus-alert-buffer-client-ruby/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zgalor/prometheus-alert-buffer-client-ruby/labels{/name}","releases_url":"https://api.github.com/repos/zgalor/prometheus-alert-buffer-client-ruby/releases{/id}","deployments_url":"https://api.github.com/repos/zgalor/prometheus-alert-buffer-client-ruby/deployments","created_at":"2017-08-07T09:03:51Z","updated_at":"2017-08-03T09:49:02Z","pushed_at":"2017-11-07T13:46:29Z","git_url":"git://github.com/zgalor/prometheus-alert-buffer-client-ruby.git","ssh_url":"git@github.com:zgalor/prometheus-alert-buffer-client-ruby.git","clone_url":"https://github.com/zgalor/prometheus-alert-buffer-client-ruby.git","svn_url":"https://github.com/zgalor/prometheus-alert-buffer-client-ruby","homepage":null,"size":13,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"openshift:master","ref":"master","sha":"400ab21d61c6d51dd5bed6c40a638231bc08939d","user":{"login":"openshift","id":792337,"avatar_url":"https://avatars3.githubusercontent.com/u/792337?v=4","gravatar_id":"","url":"https://api.github.com/users/openshift","html_url":"https://github.com/openshift","followers_url":"https://api.github.com/users/openshift/followers","following_url":"https://api.github.com/users/openshift/following{/other_user}","gists_url":"https://api.github.com/users/openshift/gists{/gist_id}","starred_url":"https://api.github.com/users/openshift/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openshift/subscriptions","organizations_url":"https://api.github.com/users/openshift/orgs","repos_url":"https://api.github.com/users/openshift/repos","events_url":"https://api.github.com/users/openshift/events{/privacy}","received_events_url":"https://api.github.com/users/openshift/received_events","type":"Organization","site_admin":false},"repo":{"id":99217342,"name":"prometheus-alert-buffer-client-ruby","full_name":"openshift/prometheus-alert-buffer-client-ruby","owner":{"login":"openshift","id":792337,"avatar_url":"https://avatars3.githubusercontent.com/u/792337?v=4","gravatar_id":"","url":"https://api.github.com/users/openshift","html_url":"https://github.com/openshift","followers_url":"https://api.github.com/users/openshift/followers","following_url":"https://api.github.com/users/openshift/following{/other_user}","gists_url":"https://api.github.com/users/openshift/gists{/gist_id}","starred_url":"https://api.github.com/users/openshift/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openshift/subscriptions","organizations_url":"https://api.github.com/users/openshift/orgs","repos_url":"https://api.github.com/users/openshift/repos","events_url":"https://api.github.com/users/openshift/events{/privacy}","received_events_url":"https://api.github.com/users/openshift/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/openshift/prometheus-alert-buffer-client-ruby","description":"A Ruby library for reading alerts stored on a Prometheus Alert Buffer server","fork":false,"url":"https://api.github.com/repos/openshift/prometheus-alert-buffer-client-ruby","forks_url":"https://api.github.com/repos/openshift/prometheus-alert-buffer-client-ruby/forks","keys_url":"https://api.github.com/repos/openshift/prometheus-alert-buffer-client-ruby/keys{/key_id}","collaborators_url":"https://api.github.com/repos/openshift/prometheus-alert-buffer-client-ruby/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/openshift/prometheus-alert-buffer-client-ruby/teams","hooks_url":"https://api.github.com/repos/openshift/prometheus-alert-buffer-client-ruby/hooks","issue_events_url":"https://api.github.com/repos/openshift/prometheus-alert-buffer-client-ruby/issues/events{/number}","events_url":"https://api.github.com/repos/openshift/prometheus-alert-buffer-client-ruby/events","assignees_url":"https://api.github.com/repos/openshift/prometheus-alert-buffer-client-ruby/assignees{/user}","branches_url":"https://api.github.com/repos/openshift/prometheus-alert-buffer-client-ruby/branches{/branch}","tags_url":"https://api.github.com/repos/openshift/prometheus-alert-buffer-client-ruby/tags","blobs_url":"https://api.github.com/repos/openshift/prometheus-alert-buffer-client-ruby/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/openshift/prometheus-alert-buffer-client-ruby/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/openshift/prometheus-alert-buffer-client-ruby/git/refs{/sha}","trees_url":"https://api.github.com/repos/openshift/prometheus-alert-buffer-client-ruby/git/trees{/sha}","statuses_url":"https://api.github.com/repos/openshift/prometheus-alert-buffer-client-ruby/statuses/{sha}","languages_url":"https://api.github.com/repos/openshift/prometheus-alert-buffer-client-ruby/languages","stargazers_url":"https://api.github.com/repos/openshift/prometheus-alert-buffer-client-ruby/stargazers","contributors_url":"https://api.github.com/repos/openshift/prometheus-alert-buffer-client-ruby/contributors","subscribers_url":"https://api.github.com/repos/openshift/prometheus-alert-buffer-client-ruby/subscribers","subscription_url":"https://api.github.com/repos/openshift/prometheus-alert-buffer-client-ruby/subscription","commits_url":"https://api.github.com/repos/openshift/prometheus-alert-buffer-client-ruby/commits{/sha}","git_commits_url":"https://api.github.com/repos/openshift/prometheus-alert-buffer-client-ruby/git/commits{/sha}","comments_url":"https://api.github.com/repos/openshift/prometheus-alert-buffer-client-ruby/comments{/number}","issue_comment_url":"https://api.github.com/repos/openshift/prometheus-alert-buffer-client-ruby/issues/comments{/number}","contents_url":"https://api.github.com/repos/openshift/prometheus-alert-buffer-client-ruby/contents/{+path}","compare_url":"https://api.github.com/repos/openshift/prometheus-alert-buffer-client-ruby/compare/{base}...{head}","merges_url":"https://api.github.com/repos/openshift/prometheus-alert-buffer-client-ruby/merges","archive_url":"https://api.github.com/repos/openshift/prometheus-alert-buffer-client-ruby/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/openshift/prometheus-alert-buffer-client-ruby/downloads","issues_url":"https://api.github.com/repos/openshift/prometheus-alert-buffer-client-ruby/issues{/number}","pulls_url":"https://api.github.com/repos/openshift/prometheus-alert-buffer-client-ruby/pulls{/number}","milestones_url":"https://api.github.com/repos/openshift/prometheus-alert-buffer-client-ruby/milestones{/number}","notifications_url":"https://api.github.com/repos/openshift/prometheus-alert-buffer-client-ruby/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/openshift/prometheus-alert-buffer-client-ruby/labels{/name}","releases_url":"https://api.github.com/repos/openshift/prometheus-alert-buffer-client-ruby/releases{/id}","deployments_url":"https://api.github.com/repos/openshift/prometheus-alert-buffer-client-ruby/deployments","created_at":"2017-08-03T09:47:52Z","updated_at":"2017-11-07T15:36:56Z","pushed_at":"2017-11-07T13:46:30Z","git_url":"git://github.com/openshift/prometheus-alert-buffer-client-ruby.git","ssh_url":"git@github.com:openshift/prometheus-alert-buffer-client-ruby.git","clone_url":"https://github.com/openshift/prometheus-alert-buffer-client-ruby.git","svn_url":"https://github.com/openshift/prometheus-alert-buffer-client-ruby","homepage":"","size":11,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/openshift/prometheus-alert-buffer-client-ruby/pulls/2"},"html":{"href":"https://github.com/openshift/prometheus-alert-buffer-client-ruby/pull/2"},"issue":{"href":"https://api.github.com/repos/openshift/prometheus-alert-buffer-client-ruby/issues/2"},"comments":{"href":"https://api.github.com/repos/openshift/prometheus-alert-buffer-client-ruby/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/openshift/prometheus-alert-buffer-client-ruby/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/openshift/prometheus-alert-buffer-client-ruby/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/openshift/prometheus-alert-buffer-client-ruby/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/openshift/prometheus-alert-buffer-client-ruby/statuses/1bf49ecfe36107ee0222fb73343a17f9b834ac2a"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"moolitayer"}}