{"action":"created","comment":{"url":"https://api.github.com/repos/KnuxWild/octo-happiness/pulls/comments/23757769","id":23757769,"diff_hunk":"@@ -0,0 +1,39 @@\n+# Main task of this module is to create and post comments to GitHub, which are describing\n+# stylistic errors in ruby code.\n+\n+require_relative \"patch_processing\"\n+\n+module CommentsCreating\n+  extend self\n+\n+    def create_comments(style_check_report, pull_request)\n+      path_prefix = Rails.root.join('tmp', 'pull_requests', pull_request.id.to_s).to_s.split('/')\n+      files = {}\n+      pull_request.files.each do |file|\n+        files[file[\"filename\"]] = file\n+      end\n+      style_check_report.each do |file_check_report|\n+        comment = \"\"\n+        patch_line = nil\n+        absolute_path = file_check_report[\"files\"][0][\"path\"].split('/')","path":"octo-happiness/comments_creating.rb","position":18,"original_position":18,"commit_id":"cf485cfa8c00856dc312e5f35f2e0cb053c132d4","original_commit_id":"cf485cfa8c00856dc312e5f35f2e0cb053c132d4","user":{"login":"KnuxWild","id":3476246,"avatar_url":"https://avatars.githubusercontent.com/u/3476246?v=3","gravatar_id":"","url":"https://api.github.com/users/KnuxWild","html_url":"https://github.com/KnuxWild","followers_url":"https://api.github.com/users/KnuxWild/followers","following_url":"https://api.github.com/users/KnuxWild/following{/other_user}","gists_url":"https://api.github.com/users/KnuxWild/gists{/gist_id}","starred_url":"https://api.github.com/users/KnuxWild/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KnuxWild/subscriptions","organizations_url":"https://api.github.com/users/KnuxWild/orgs","repos_url":"https://api.github.com/users/KnuxWild/repos","events_url":"https://api.github.com/users/KnuxWild/events{/privacy}","received_events_url":"https://api.github.com/users/KnuxWild/received_events","type":"User","site_admin":false},"body":"Warning! (convention):\nLine is too long. [89/80]\nWarning! (convention):\nPrefer single-quoted strings when you don't need string interpolation or special symbols.\nWarning! (convention):\nMissing top-level module documentation comment.\nWarning! (convention):\nUse `module_function` instead of `extend self`.\nWarning! (convention):\nMethod has too many lines. [25/10]\nWarning! (convention):\nInconsistent indentation detected.\nWarning! (convention):\nLine is too long. [97/80]\nWarning! (convention):\nPrefer single-quoted strings when you don't need string interpolation or special symbols.\nWarning! (convention):\nPrefer single-quoted strings when you don't need string interpolation or special symbols.\nWarning! (convention):\nPrefer single-quoted strings when you don't need string interpolation or special symbols.\nWarning! (convention):\nPrefer single-quoted strings when you don't need string interpolation or special symbols.\nWarning! (convention):\nPrefer single-quoted strings when you don't need string interpolation or special symbols.\n","created_at":"2015-01-29T10:12:50Z","updated_at":"2015-01-29T10:12:50Z","html_url":"https://github.com/KnuxWild/octo-happiness/pull/1#discussion_r23757769","pull_request_url":"https://api.github.com/repos/KnuxWild/octo-happiness/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/KnuxWild/octo-happiness/pulls/comments/23757769"},"html":{"href":"https://github.com/KnuxWild/octo-happiness/pull/1#discussion_r23757769"},"pull_request":{"href":"https://api.github.com/repos/KnuxWild/octo-happiness/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/KnuxWild/octo-happiness/pulls/1","id":28266833,"html_url":"https://github.com/KnuxWild/octo-happiness/pull/1","diff_url":"https://github.com/KnuxWild/octo-happiness/pull/1.diff","patch_url":"https://github.com/KnuxWild/octo-happiness/pull/1.patch","issue_url":"https://api.github.com/repos/KnuxWild/octo-happiness/issues/1","number":1,"state":"open","locked":false,"title":"Testing","user":{"login":"KnuxWild","id":3476246,"avatar_url":"https://avatars.githubusercontent.com/u/3476246?v=3","gravatar_id":"","url":"https://api.github.com/users/KnuxWild","html_url":"https://github.com/KnuxWild","followers_url":"https://api.github.com/users/KnuxWild/followers","following_url":"https://api.github.com/users/KnuxWild/following{/other_user}","gists_url":"https://api.github.com/users/KnuxWild/gists{/gist_id}","starred_url":"https://api.github.com/users/KnuxWild/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KnuxWild/subscriptions","organizations_url":"https://api.github.com/users/KnuxWild/orgs","repos_url":"https://api.github.com/users/KnuxWild/repos","events_url":"https://api.github.com/users/KnuxWild/events{/privacy}","received_events_url":"https://api.github.com/users/KnuxWild/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-01-29T10:12:14Z","updated_at":"2015-01-29T10:12:50Z","closed_at":null,"merged_at":null,"merge_commit_sha":"33a382ade8fde61d92f3f207b141810a39cc3006","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/KnuxWild/octo-happiness/pulls/1/commits","review_comments_url":"https://api.github.com/repos/KnuxWild/octo-happiness/pulls/1/comments","review_comment_url":"https://api.github.com/repos/KnuxWild/octo-happiness/pulls/comments/{number}","comments_url":"https://api.github.com/repos/KnuxWild/octo-happiness/issues/1/comments","statuses_url":"https://api.github.com/repos/KnuxWild/octo-happiness/statuses/cf485cfa8c00856dc312e5f35f2e0cb053c132d4","head":{"label":"KnuxWild:test","ref":"test","sha":"cf485cfa8c00856dc312e5f35f2e0cb053c132d4","user":{"login":"KnuxWild","id":3476246,"avatar_url":"https://avatars.githubusercontent.com/u/3476246?v=3","gravatar_id":"","url":"https://api.github.com/users/KnuxWild","html_url":"https://github.com/KnuxWild","followers_url":"https://api.github.com/users/KnuxWild/followers","following_url":"https://api.github.com/users/KnuxWild/following{/other_user}","gists_url":"https://api.github.com/users/KnuxWild/gists{/gist_id}","starred_url":"https://api.github.com/users/KnuxWild/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KnuxWild/subscriptions","organizations_url":"https://api.github.com/users/KnuxWild/orgs","repos_url":"https://api.github.com/users/KnuxWild/repos","events_url":"https://api.github.com/users/KnuxWild/events{/privacy}","received_events_url":"https://api.github.com/users/KnuxWild/received_events","type":"User","site_admin":false},"repo":{"id":29679418,"name":"octo-happiness","full_name":"KnuxWild/octo-happiness","owner":{"login":"KnuxWild","id":3476246,"avatar_url":"https://avatars.githubusercontent.com/u/3476246?v=3","gravatar_id":"","url":"https://api.github.com/users/KnuxWild","html_url":"https://github.com/KnuxWild","followers_url":"https://api.github.com/users/KnuxWild/followers","following_url":"https://api.github.com/users/KnuxWild/following{/other_user}","gists_url":"https://api.github.com/users/KnuxWild/gists{/gist_id}","starred_url":"https://api.github.com/users/KnuxWild/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KnuxWild/subscriptions","organizations_url":"https://api.github.com/users/KnuxWild/orgs","repos_url":"https://api.github.com/users/KnuxWild/repos","events_url":"https://api.github.com/users/KnuxWild/events{/privacy}","received_events_url":"https://api.github.com/users/KnuxWild/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/KnuxWild/octo-happiness","description":"","fork":false,"url":"https://api.github.com/repos/KnuxWild/octo-happiness","forks_url":"https://api.github.com/repos/KnuxWild/octo-happiness/forks","keys_url":"https://api.github.com/repos/KnuxWild/octo-happiness/keys{/key_id}","collaborators_url":"https://api.github.com/repos/KnuxWild/octo-happiness/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/KnuxWild/octo-happiness/teams","hooks_url":"https://api.github.com/repos/KnuxWild/octo-happiness/hooks","issue_events_url":"https://api.github.com/repos/KnuxWild/octo-happiness/issues/events{/number}","events_url":"https://api.github.com/repos/KnuxWild/octo-happiness/events","assignees_url":"https://api.github.com/repos/KnuxWild/octo-happiness/assignees{/user}","branches_url":"https://api.github.com/repos/KnuxWild/octo-happiness/branches{/branch}","tags_url":"https://api.github.com/repos/KnuxWild/octo-happiness/tags","blobs_url":"https://api.github.com/repos/KnuxWild/octo-happiness/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/KnuxWild/octo-happiness/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/KnuxWild/octo-happiness/git/refs{/sha}","trees_url":"https://api.github.com/repos/KnuxWild/octo-happiness/git/trees{/sha}","statuses_url":"https://api.github.com/repos/KnuxWild/octo-happiness/statuses/{sha}","languages_url":"https://api.github.com/repos/KnuxWild/octo-happiness/languages","stargazers_url":"https://api.github.com/repos/KnuxWild/octo-happiness/stargazers","contributors_url":"https://api.github.com/repos/KnuxWild/octo-happiness/contributors","subscribers_url":"https://api.github.com/repos/KnuxWild/octo-happiness/subscribers","subscription_url":"https://api.github.com/repos/KnuxWild/octo-happiness/subscription","commits_url":"https://api.github.com/repos/KnuxWild/octo-happiness/commits{/sha}","git_commits_url":"https://api.github.com/repos/KnuxWild/octo-happiness/git/commits{/sha}","comments_url":"https://api.github.com/repos/KnuxWild/octo-happiness/comments{/number}","issue_comment_url":"https://api.github.com/repos/KnuxWild/octo-happiness/issues/comments/{number}","contents_url":"https://api.github.com/repos/KnuxWild/octo-happiness/contents/{+path}","compare_url":"https://api.github.com/repos/KnuxWild/octo-happiness/compare/{base}...{head}","merges_url":"https://api.github.com/repos/KnuxWild/octo-happiness/merges","archive_url":"https://api.github.com/repos/KnuxWild/octo-happiness/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/KnuxWild/octo-happiness/downloads","issues_url":"https://api.github.com/repos/KnuxWild/octo-happiness/issues{/number}","pulls_url":"https://api.github.com/repos/KnuxWild/octo-happiness/pulls{/number}","milestones_url":"https://api.github.com/repos/KnuxWild/octo-happiness/milestones{/number}","notifications_url":"https://api.github.com/repos/KnuxWild/octo-happiness/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/KnuxWild/octo-happiness/labels{/name}","releases_url":"https://api.github.com/repos/KnuxWild/octo-happiness/releases{/id}","created_at":"2015-01-22T13:15:17Z","updated_at":"2015-01-22T13:15:17Z","pushed_at":"2015-01-22T13:22:25Z","git_url":"git://github.com/KnuxWild/octo-happiness.git","ssh_url":"git@github.com:KnuxWild/octo-happiness.git","clone_url":"https://github.com/KnuxWild/octo-happiness.git","svn_url":"https://github.com/KnuxWild/octo-happiness","homepage":null,"size":0,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"KnuxWild:master","ref":"master","sha":"508291952e843b6f7e4fd3b36249e165b1929020","user":{"login":"KnuxWild","id":3476246,"avatar_url":"https://avatars.githubusercontent.com/u/3476246?v=3","gravatar_id":"","url":"https://api.github.com/users/KnuxWild","html_url":"https://github.com/KnuxWild","followers_url":"https://api.github.com/users/KnuxWild/followers","following_url":"https://api.github.com/users/KnuxWild/following{/other_user}","gists_url":"https://api.github.com/users/KnuxWild/gists{/gist_id}","starred_url":"https://api.github.com/users/KnuxWild/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KnuxWild/subscriptions","organizations_url":"https://api.github.com/users/KnuxWild/orgs","repos_url":"https://api.github.com/users/KnuxWild/repos","events_url":"https://api.github.com/users/KnuxWild/events{/privacy}","received_events_url":"https://api.github.com/users/KnuxWild/received_events","type":"User","site_admin":false},"repo":{"id":29679418,"name":"octo-happiness","full_name":"KnuxWild/octo-happiness","owner":{"login":"KnuxWild","id":3476246,"avatar_url":"https://avatars.githubusercontent.com/u/3476246?v=3","gravatar_id":"","url":"https://api.github.com/users/KnuxWild","html_url":"https://github.com/KnuxWild","followers_url":"https://api.github.com/users/KnuxWild/followers","following_url":"https://api.github.com/users/KnuxWild/following{/other_user}","gists_url":"https://api.github.com/users/KnuxWild/gists{/gist_id}","starred_url":"https://api.github.com/users/KnuxWild/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KnuxWild/subscriptions","organizations_url":"https://api.github.com/users/KnuxWild/orgs","repos_url":"https://api.github.com/users/KnuxWild/repos","events_url":"https://api.github.com/users/KnuxWild/events{/privacy}","received_events_url":"https://api.github.com/users/KnuxWild/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/KnuxWild/octo-happiness","description":"","fork":false,"url":"https://api.github.com/repos/KnuxWild/octo-happiness","forks_url":"https://api.github.com/repos/KnuxWild/octo-happiness/forks","keys_url":"https://api.github.com/repos/KnuxWild/octo-happiness/keys{/key_id}","collaborators_url":"https://api.github.com/repos/KnuxWild/octo-happiness/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/KnuxWild/octo-happiness/teams","hooks_url":"https://api.github.com/repos/KnuxWild/octo-happiness/hooks","issue_events_url":"https://api.github.com/repos/KnuxWild/octo-happiness/issues/events{/number}","events_url":"https://api.github.com/repos/KnuxWild/octo-happiness/events","assignees_url":"https://api.github.com/repos/KnuxWild/octo-happiness/assignees{/user}","branches_url":"https://api.github.com/repos/KnuxWild/octo-happiness/branches{/branch}","tags_url":"https://api.github.com/repos/KnuxWild/octo-happiness/tags","blobs_url":"https://api.github.com/repos/KnuxWild/octo-happiness/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/KnuxWild/octo-happiness/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/KnuxWild/octo-happiness/git/refs{/sha}","trees_url":"https://api.github.com/repos/KnuxWild/octo-happiness/git/trees{/sha}","statuses_url":"https://api.github.com/repos/KnuxWild/octo-happiness/statuses/{sha}","languages_url":"https://api.github.com/repos/KnuxWild/octo-happiness/languages","stargazers_url":"https://api.github.com/repos/KnuxWild/octo-happiness/stargazers","contributors_url":"https://api.github.com/repos/KnuxWild/octo-happiness/contributors","subscribers_url":"https://api.github.com/repos/KnuxWild/octo-happiness/subscribers","subscription_url":"https://api.github.com/repos/KnuxWild/octo-happiness/subscription","commits_url":"https://api.github.com/repos/KnuxWild/octo-happiness/commits{/sha}","git_commits_url":"https://api.github.com/repos/KnuxWild/octo-happiness/git/commits{/sha}","comments_url":"https://api.github.com/repos/KnuxWild/octo-happiness/comments{/number}","issue_comment_url":"https://api.github.com/repos/KnuxWild/octo-happiness/issues/comments/{number}","contents_url":"https://api.github.com/repos/KnuxWild/octo-happiness/contents/{+path}","compare_url":"https://api.github.com/repos/KnuxWild/octo-happiness/compare/{base}...{head}","merges_url":"https://api.github.com/repos/KnuxWild/octo-happiness/merges","archive_url":"https://api.github.com/repos/KnuxWild/octo-happiness/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/KnuxWild/octo-happiness/downloads","issues_url":"https://api.github.com/repos/KnuxWild/octo-happiness/issues{/number}","pulls_url":"https://api.github.com/repos/KnuxWild/octo-happiness/pulls{/number}","milestones_url":"https://api.github.com/repos/KnuxWild/octo-happiness/milestones{/number}","notifications_url":"https://api.github.com/repos/KnuxWild/octo-happiness/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/KnuxWild/octo-happiness/labels{/name}","releases_url":"https://api.github.com/repos/KnuxWild/octo-happiness/releases{/id}","created_at":"2015-01-22T13:15:17Z","updated_at":"2015-01-22T13:15:17Z","pushed_at":"2015-01-22T13:22:25Z","git_url":"git://github.com/KnuxWild/octo-happiness.git","ssh_url":"git@github.com:KnuxWild/octo-happiness.git","clone_url":"https://github.com/KnuxWild/octo-happiness.git","svn_url":"https://github.com/KnuxWild/octo-happiness","homepage":null,"size":0,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/KnuxWild/octo-happiness/pulls/1"},"html":{"href":"https://github.com/KnuxWild/octo-happiness/pull/1"},"issue":{"href":"https://api.github.com/repos/KnuxWild/octo-happiness/issues/1"},"comments":{"href":"https://api.github.com/repos/KnuxWild/octo-happiness/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/KnuxWild/octo-happiness/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/KnuxWild/octo-happiness/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/KnuxWild/octo-happiness/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/KnuxWild/octo-happiness/statuses/cf485cfa8c00856dc312e5f35f2e0cb053c132d4"}}}}