{"action":"created","comment":{"url":"https://api.github.com/repos/crowbar/crowbar-init/pulls/comments/87371905","pull_request_review_id":7985911,"id":87371905,"diff_hunk":"@@ -31,6 +31,10 @@ class Application < Sinatra::Base\n \n       before do\n         logger.level = Logger::DEBUG\n+        # parse JSON in POST requests\n+        if request.request_method == \"POST\" && request.content_type.start_with?(\"application/json\")\n+            params.merge!(JSON.parse(request.body.read, {symbolize_names: true}))","path":"lib/crowbar/init/application.rb","position":6,"original_position":6,"commit_id":"11a0f5aa575648a9e23ca3ff4fd44f42e4965b78","original_commit_id":"11a0f5aa575648a9e23ca3ff4fd44f42e4965b78","user":{"login":"houndci-bot","id":6697940,"avatar_url":"https://avatars.githubusercontent.com/u/6697940?v=3","gravatar_id":"","url":"https://api.github.com/users/houndci-bot","html_url":"https://github.com/houndci-bot","followers_url":"https://api.github.com/users/houndci-bot/followers","following_url":"https://api.github.com/users/houndci-bot/following{/other_user}","gists_url":"https://api.github.com/users/houndci-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/houndci-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houndci-bot/subscriptions","organizations_url":"https://api.github.com/users/houndci-bot/orgs","repos_url":"https://api.github.com/users/houndci-bot/repos","events_url":"https://api.github.com/users/houndci-bot/events{/privacy}","received_events_url":"https://api.github.com/users/houndci-bot/received_events","type":"User","site_admin":false},"body":"Style/IndentationWidth: Use 2 (not 4) spaces for indentation. (https://github.com/bbatsov/ruby-style-guide#spaces-indentation)<br>Style/BracesAroundHashParameters: Redundant curly braces around a hash parameter.<br>Style/SpaceInsideHashLiteralBraces: Space inside { missing. (https://github.com/bbatsov/ruby-style-guide#spaces-operators)<br>Style/SpaceInsideHashLiteralBraces: Space inside } missing. (https://github.com/bbatsov/ruby-style-guide#spaces-operators)","created_at":"2016-11-10T10:59:10Z","updated_at":"2016-11-10T10:59:10Z","html_url":"https://github.com/crowbar/crowbar-init/pull/48#discussion_r87371905","pull_request_url":"https://api.github.com/repos/crowbar/crowbar-init/pulls/48","_links":{"self":{"href":"https://api.github.com/repos/crowbar/crowbar-init/pulls/comments/87371905"},"html":{"href":"https://github.com/crowbar/crowbar-init/pull/48#discussion_r87371905"},"pull_request":{"href":"https://api.github.com/repos/crowbar/crowbar-init/pulls/48"}}},"pull_request":{"url":"https://api.github.com/repos/crowbar/crowbar-init/pulls/48","id":93128708,"html_url":"https://github.com/crowbar/crowbar-init/pull/48","diff_url":"https://github.com/crowbar/crowbar-init/pull/48.diff","patch_url":"https://github.com/crowbar/crowbar-init/pull/48.patch","issue_url":"https://api.github.com/repos/crowbar/crowbar-init/issues/48","number":48,"state":"open","locked":false,"title":"Parse JSON data in POST requests.","user":{"login":"skazi0","id":2458112,"avatar_url":"https://avatars.githubusercontent.com/u/2458112?v=3","gravatar_id":"","url":"https://api.github.com/users/skazi0","html_url":"https://github.com/skazi0","followers_url":"https://api.github.com/users/skazi0/followers","following_url":"https://api.github.com/users/skazi0/following{/other_user}","gists_url":"https://api.github.com/users/skazi0/gists{/gist_id}","starred_url":"https://api.github.com/users/skazi0/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/skazi0/subscriptions","organizations_url":"https://api.github.com/users/skazi0/orgs","repos_url":"https://api.github.com/users/skazi0/repos","events_url":"https://api.github.com/users/skazi0/events{/privacy}","received_events_url":"https://api.github.com/users/skazi0/received_events","type":"User","site_admin":false},"body":"Sinatra supports only application/x-www-form-urlencoded payloads in\r\nPOST request by default. The crowbar-ui sends requests in JSON format\r\nwhich needs some additional preprocessing for proper handling.","created_at":"2016-11-10T10:59:05Z","updated_at":"2016-11-10T10:59:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":"eb4f659a4f4701890251af356dc31eb4a84ea407","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/crowbar/crowbar-init/pulls/48/commits","review_comments_url":"https://api.github.com/repos/crowbar/crowbar-init/pulls/48/comments","review_comment_url":"https://api.github.com/repos/crowbar/crowbar-init/pulls/comments{/number}","comments_url":"https://api.github.com/repos/crowbar/crowbar-init/issues/48/comments","statuses_url":"https://api.github.com/repos/crowbar/crowbar-init/statuses/11a0f5aa575648a9e23ca3ff4fd44f42e4965b78","head":{"label":"skazi0:json-post-payload","ref":"json-post-payload","sha":"11a0f5aa575648a9e23ca3ff4fd44f42e4965b78","user":{"login":"skazi0","id":2458112,"avatar_url":"https://avatars.githubusercontent.com/u/2458112?v=3","gravatar_id":"","url":"https://api.github.com/users/skazi0","html_url":"https://github.com/skazi0","followers_url":"https://api.github.com/users/skazi0/followers","following_url":"https://api.github.com/users/skazi0/following{/other_user}","gists_url":"https://api.github.com/users/skazi0/gists{/gist_id}","starred_url":"https://api.github.com/users/skazi0/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/skazi0/subscriptions","organizations_url":"https://api.github.com/users/skazi0/orgs","repos_url":"https://api.github.com/users/skazi0/repos","events_url":"https://api.github.com/users/skazi0/events{/privacy}","received_events_url":"https://api.github.com/users/skazi0/received_events","type":"User","site_admin":false},"repo":{"id":73372511,"name":"crowbar-init","full_name":"skazi0/crowbar-init","owner":{"login":"skazi0","id":2458112,"avatar_url":"https://avatars.githubusercontent.com/u/2458112?v=3","gravatar_id":"","url":"https://api.github.com/users/skazi0","html_url":"https://github.com/skazi0","followers_url":"https://api.github.com/users/skazi0/followers","following_url":"https://api.github.com/users/skazi0/following{/other_user}","gists_url":"https://api.github.com/users/skazi0/gists{/gist_id}","starred_url":"https://api.github.com/users/skazi0/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/skazi0/subscriptions","organizations_url":"https://api.github.com/users/skazi0/orgs","repos_url":"https://api.github.com/users/skazi0/repos","events_url":"https://api.github.com/users/skazi0/events{/privacy}","received_events_url":"https://api.github.com/users/skazi0/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/skazi0/crowbar-init","description":"Init process for Crowbar","fork":true,"url":"https://api.github.com/repos/skazi0/crowbar-init","forks_url":"https://api.github.com/repos/skazi0/crowbar-init/forks","keys_url":"https://api.github.com/repos/skazi0/crowbar-init/keys{/key_id}","collaborators_url":"https://api.github.com/repos/skazi0/crowbar-init/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/skazi0/crowbar-init/teams","hooks_url":"https://api.github.com/repos/skazi0/crowbar-init/hooks","issue_events_url":"https://api.github.com/repos/skazi0/crowbar-init/issues/events{/number}","events_url":"https://api.github.com/repos/skazi0/crowbar-init/events","assignees_url":"https://api.github.com/repos/skazi0/crowbar-init/assignees{/user}","branches_url":"https://api.github.com/repos/skazi0/crowbar-init/branches{/branch}","tags_url":"https://api.github.com/repos/skazi0/crowbar-init/tags","blobs_url":"https://api.github.com/repos/skazi0/crowbar-init/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/skazi0/crowbar-init/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/skazi0/crowbar-init/git/refs{/sha}","trees_url":"https://api.github.com/repos/skazi0/crowbar-init/git/trees{/sha}","statuses_url":"https://api.github.com/repos/skazi0/crowbar-init/statuses/{sha}","languages_url":"https://api.github.com/repos/skazi0/crowbar-init/languages","stargazers_url":"https://api.github.com/repos/skazi0/crowbar-init/stargazers","contributors_url":"https://api.github.com/repos/skazi0/crowbar-init/contributors","subscribers_url":"https://api.github.com/repos/skazi0/crowbar-init/subscribers","subscription_url":"https://api.github.com/repos/skazi0/crowbar-init/subscription","commits_url":"https://api.github.com/repos/skazi0/crowbar-init/commits{/sha}","git_commits_url":"https://api.github.com/repos/skazi0/crowbar-init/git/commits{/sha}","comments_url":"https://api.github.com/repos/skazi0/crowbar-init/comments{/number}","issue_comment_url":"https://api.github.com/repos/skazi0/crowbar-init/issues/comments{/number}","contents_url":"https://api.github.com/repos/skazi0/crowbar-init/contents/{+path}","compare_url":"https://api.github.com/repos/skazi0/crowbar-init/compare/{base}...{head}","merges_url":"https://api.github.com/repos/skazi0/crowbar-init/merges","archive_url":"https://api.github.com/repos/skazi0/crowbar-init/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/skazi0/crowbar-init/downloads","issues_url":"https://api.github.com/repos/skazi0/crowbar-init/issues{/number}","pulls_url":"https://api.github.com/repos/skazi0/crowbar-init/pulls{/number}","milestones_url":"https://api.github.com/repos/skazi0/crowbar-init/milestones{/number}","notifications_url":"https://api.github.com/repos/skazi0/crowbar-init/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/skazi0/crowbar-init/labels{/name}","releases_url":"https://api.github.com/repos/skazi0/crowbar-init/releases{/id}","deployments_url":"https://api.github.com/repos/skazi0/crowbar-init/deployments","created_at":"2016-11-10T10:42:29Z","updated_at":"2016-11-10T10:42:30Z","pushed_at":"2016-11-10T10:57:12Z","git_url":"git://github.com/skazi0/crowbar-init.git","ssh_url":"git@github.com:skazi0/crowbar-init.git","clone_url":"https://github.com/skazi0/crowbar-init.git","svn_url":"https://github.com/skazi0/crowbar-init","homepage":"","size":266,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"crowbar:master","ref":"master","sha":"e1de2914c813bcc1a508ee95168964fe08b01024","user":{"login":"crowbar","id":2910205,"avatar_url":"https://avatars.githubusercontent.com/u/2910205?v=3","gravatar_id":"","url":"https://api.github.com/users/crowbar","html_url":"https://github.com/crowbar","followers_url":"https://api.github.com/users/crowbar/followers","following_url":"https://api.github.com/users/crowbar/following{/other_user}","gists_url":"https://api.github.com/users/crowbar/gists{/gist_id}","starred_url":"https://api.github.com/users/crowbar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/crowbar/subscriptions","organizations_url":"https://api.github.com/users/crowbar/orgs","repos_url":"https://api.github.com/users/crowbar/repos","events_url":"https://api.github.com/users/crowbar/events{/privacy}","received_events_url":"https://api.github.com/users/crowbar/received_events","type":"Organization","site_admin":false},"repo":{"id":56591765,"name":"crowbar-init","full_name":"crowbar/crowbar-init","owner":{"login":"crowbar","id":2910205,"avatar_url":"https://avatars.githubusercontent.com/u/2910205?v=3","gravatar_id":"","url":"https://api.github.com/users/crowbar","html_url":"https://github.com/crowbar","followers_url":"https://api.github.com/users/crowbar/followers","following_url":"https://api.github.com/users/crowbar/following{/other_user}","gists_url":"https://api.github.com/users/crowbar/gists{/gist_id}","starred_url":"https://api.github.com/users/crowbar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/crowbar/subscriptions","organizations_url":"https://api.github.com/users/crowbar/orgs","repos_url":"https://api.github.com/users/crowbar/repos","events_url":"https://api.github.com/users/crowbar/events{/privacy}","received_events_url":"https://api.github.com/users/crowbar/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/crowbar/crowbar-init","description":"Init process for Crowbar","fork":false,"url":"https://api.github.com/repos/crowbar/crowbar-init","forks_url":"https://api.github.com/repos/crowbar/crowbar-init/forks","keys_url":"https://api.github.com/repos/crowbar/crowbar-init/keys{/key_id}","collaborators_url":"https://api.github.com/repos/crowbar/crowbar-init/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/crowbar/crowbar-init/teams","hooks_url":"https://api.github.com/repos/crowbar/crowbar-init/hooks","issue_events_url":"https://api.github.com/repos/crowbar/crowbar-init/issues/events{/number}","events_url":"https://api.github.com/repos/crowbar/crowbar-init/events","assignees_url":"https://api.github.com/repos/crowbar/crowbar-init/assignees{/user}","branches_url":"https://api.github.com/repos/crowbar/crowbar-init/branches{/branch}","tags_url":"https://api.github.com/repos/crowbar/crowbar-init/tags","blobs_url":"https://api.github.com/repos/crowbar/crowbar-init/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/crowbar/crowbar-init/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/crowbar/crowbar-init/git/refs{/sha}","trees_url":"https://api.github.com/repos/crowbar/crowbar-init/git/trees{/sha}","statuses_url":"https://api.github.com/repos/crowbar/crowbar-init/statuses/{sha}","languages_url":"https://api.github.com/repos/crowbar/crowbar-init/languages","stargazers_url":"https://api.github.com/repos/crowbar/crowbar-init/stargazers","contributors_url":"https://api.github.com/repos/crowbar/crowbar-init/contributors","subscribers_url":"https://api.github.com/repos/crowbar/crowbar-init/subscribers","subscription_url":"https://api.github.com/repos/crowbar/crowbar-init/subscription","commits_url":"https://api.github.com/repos/crowbar/crowbar-init/commits{/sha}","git_commits_url":"https://api.github.com/repos/crowbar/crowbar-init/git/commits{/sha}","comments_url":"https://api.github.com/repos/crowbar/crowbar-init/comments{/number}","issue_comment_url":"https://api.github.com/repos/crowbar/crowbar-init/issues/comments{/number}","contents_url":"https://api.github.com/repos/crowbar/crowbar-init/contents/{+path}","compare_url":"https://api.github.com/repos/crowbar/crowbar-init/compare/{base}...{head}","merges_url":"https://api.github.com/repos/crowbar/crowbar-init/merges","archive_url":"https://api.github.com/repos/crowbar/crowbar-init/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/crowbar/crowbar-init/downloads","issues_url":"https://api.github.com/repos/crowbar/crowbar-init/issues{/number}","pulls_url":"https://api.github.com/repos/crowbar/crowbar-init/pulls{/number}","milestones_url":"https://api.github.com/repos/crowbar/crowbar-init/milestones{/number}","notifications_url":"https://api.github.com/repos/crowbar/crowbar-init/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/crowbar/crowbar-init/labels{/name}","releases_url":"https://api.github.com/repos/crowbar/crowbar-init/releases{/id}","deployments_url":"https://api.github.com/repos/crowbar/crowbar-init/deployments","created_at":"2016-04-19T11:41:06Z","updated_at":"2016-10-28T13:06:51Z","pushed_at":"2016-11-10T10:59:05Z","git_url":"git://github.com/crowbar/crowbar-init.git","ssh_url":"git@github.com:crowbar/crowbar-init.git","clone_url":"https://github.com/crowbar/crowbar-init.git","svn_url":"https://github.com/crowbar/crowbar-init","homepage":"","size":266,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":6,"mirror_url":null,"open_issues_count":5,"forks":6,"open_issues":5,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/crowbar/crowbar-init/pulls/48"},"html":{"href":"https://github.com/crowbar/crowbar-init/pull/48"},"issue":{"href":"https://api.github.com/repos/crowbar/crowbar-init/issues/48"},"comments":{"href":"https://api.github.com/repos/crowbar/crowbar-init/issues/48/comments"},"review_comments":{"href":"https://api.github.com/repos/crowbar/crowbar-init/pulls/48/comments"},"review_comment":{"href":"https://api.github.com/repos/crowbar/crowbar-init/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/crowbar/crowbar-init/pulls/48/commits"},"statuses":{"href":"https://api.github.com/repos/crowbar/crowbar-init/statuses/11a0f5aa575648a9e23ca3ff4fd44f42e4965b78"}}}}
{"actor":{"display_login":"houndci-bot"}}