{"action":"created","comment":{"url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/pulls/comments/85810381","pull_request_review_id":6504198,"id":85810381,"diff_hunk":"@@ -0,0 +1,42 @@\n+require_relative 'lib/user'\n+require_relative 'lib/bot_message_dispatcher'\n+require 'yaml'\n+require 'json'\n+require 'pry'\n+\n+class TelegramBot\n+\n+  def call(env)\n+    @webhook = JSON.parse(env['rack.input'].read)\n+    response(dispatcher.new(@webhook, user).process)\n+  end\n+\n+  def response(message)\n+    ['200', \n+     {'Content-Type' => 'application/json'}, \n+     [message.to_json]] \n+  end\n+ \n+  def dispatcher\n+    BotMessageDispatcher\n+  end\n+\n+  def from\n+\t\tif @webhook['callback_query'].nil?\n+\t\t\t@webhook['message']['from']\n+\t\telse","path":"2016/DaniilKachur/2/telegram_bot.rb","position":27,"original_position":27,"commit_id":"caf41580d7ebe5354a64bff959fcc5eb941f927d","original_commit_id":"caf41580d7ebe5354a64bff959fcc5eb941f927d","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":"Tab detected.","created_at":"2016-10-31T19:06:20Z","updated_at":"2016-10-31T19:06:20Z","html_url":"https://github.com/rubyroidlabs/bsuir-courses/pull/486#discussion_r85810381","pull_request_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/pulls/486","_links":{"self":{"href":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/pulls/comments/85810381"},"html":{"href":"https://github.com/rubyroidlabs/bsuir-courses/pull/486#discussion_r85810381"},"pull_request":{"href":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/pulls/486"}}},"pull_request":{"url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/pulls/486","id":91670265,"html_url":"https://github.com/rubyroidlabs/bsuir-courses/pull/486","diff_url":"https://github.com/rubyroidlabs/bsuir-courses/pull/486.diff","patch_url":"https://github.com/rubyroidlabs/bsuir-courses/pull/486.patch","issue_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/issues/486","number":486,"state":"open","locked":false,"title":"implement homework 2","user":{"login":"DDKatch","id":14095146,"avatar_url":"https://avatars.githubusercontent.com/u/14095146?v=3","gravatar_id":"","url":"https://api.github.com/users/DDKatch","html_url":"https://github.com/DDKatch","followers_url":"https://api.github.com/users/DDKatch/followers","following_url":"https://api.github.com/users/DDKatch/following{/other_user}","gists_url":"https://api.github.com/users/DDKatch/gists{/gist_id}","starred_url":"https://api.github.com/users/DDKatch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DDKatch/subscriptions","organizations_url":"https://api.github.com/users/DDKatch/orgs","repos_url":"https://api.github.com/users/DDKatch/repos","events_url":"https://api.github.com/users/DDKatch/events{/privacy}","received_events_url":"https://api.github.com/users/DDKatch/received_events","type":"User","site_admin":false},"body":"## Фамилия Имя\r\nКачур Даниил\r\n\r\n## Email\r\ndaniil.field@gmail.com\r\n\r\n## Номер домашнего задания\r\n2\r\n\r\n## Ссылка на видео с демо работы\r\n(soon)\r\n\r\n## Комментарии\r\nРабочий вариант без красивостей. Еще нужно код подрефакторить, и доделать UI.\r\n","created_at":"2016-10-31T19:06:00Z","updated_at":"2016-10-31T19:06:20Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d2bd8676f25a79b3dcf4718b4dc6045c62a33f96","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/pulls/486/commits","review_comments_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/pulls/486/comments","review_comment_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/pulls/comments{/number}","comments_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/issues/486/comments","statuses_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/statuses/caf41580d7ebe5354a64bff959fcc5eb941f927d","head":{"label":"DDKatch:homework-2","ref":"homework-2","sha":"caf41580d7ebe5354a64bff959fcc5eb941f927d","user":{"login":"DDKatch","id":14095146,"avatar_url":"https://avatars.githubusercontent.com/u/14095146?v=3","gravatar_id":"","url":"https://api.github.com/users/DDKatch","html_url":"https://github.com/DDKatch","followers_url":"https://api.github.com/users/DDKatch/followers","following_url":"https://api.github.com/users/DDKatch/following{/other_user}","gists_url":"https://api.github.com/users/DDKatch/gists{/gist_id}","starred_url":"https://api.github.com/users/DDKatch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DDKatch/subscriptions","organizations_url":"https://api.github.com/users/DDKatch/orgs","repos_url":"https://api.github.com/users/DDKatch/repos","events_url":"https://api.github.com/users/DDKatch/events{/privacy}","received_events_url":"https://api.github.com/users/DDKatch/received_events","type":"User","site_admin":false},"repo":{"id":71267085,"name":"bsuir-courses","full_name":"DDKatch/bsuir-courses","owner":{"login":"DDKatch","id":14095146,"avatar_url":"https://avatars.githubusercontent.com/u/14095146?v=3","gravatar_id":"","url":"https://api.github.com/users/DDKatch","html_url":"https://github.com/DDKatch","followers_url":"https://api.github.com/users/DDKatch/followers","following_url":"https://api.github.com/users/DDKatch/following{/other_user}","gists_url":"https://api.github.com/users/DDKatch/gists{/gist_id}","starred_url":"https://api.github.com/users/DDKatch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DDKatch/subscriptions","organizations_url":"https://api.github.com/users/DDKatch/orgs","repos_url":"https://api.github.com/users/DDKatch/repos","events_url":"https://api.github.com/users/DDKatch/events{/privacy}","received_events_url":"https://api.github.com/users/DDKatch/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/DDKatch/bsuir-courses","description":"This is common repository for all student to submit all their homeworks","fork":true,"url":"https://api.github.com/repos/DDKatch/bsuir-courses","forks_url":"https://api.github.com/repos/DDKatch/bsuir-courses/forks","keys_url":"https://api.github.com/repos/DDKatch/bsuir-courses/keys{/key_id}","collaborators_url":"https://api.github.com/repos/DDKatch/bsuir-courses/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/DDKatch/bsuir-courses/teams","hooks_url":"https://api.github.com/repos/DDKatch/bsuir-courses/hooks","issue_events_url":"https://api.github.com/repos/DDKatch/bsuir-courses/issues/events{/number}","events_url":"https://api.github.com/repos/DDKatch/bsuir-courses/events","assignees_url":"https://api.github.com/repos/DDKatch/bsuir-courses/assignees{/user}","branches_url":"https://api.github.com/repos/DDKatch/bsuir-courses/branches{/branch}","tags_url":"https://api.github.com/repos/DDKatch/bsuir-courses/tags","blobs_url":"https://api.github.com/repos/DDKatch/bsuir-courses/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/DDKatch/bsuir-courses/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/DDKatch/bsuir-courses/git/refs{/sha}","trees_url":"https://api.github.com/repos/DDKatch/bsuir-courses/git/trees{/sha}","statuses_url":"https://api.github.com/repos/DDKatch/bsuir-courses/statuses/{sha}","languages_url":"https://api.github.com/repos/DDKatch/bsuir-courses/languages","stargazers_url":"https://api.github.com/repos/DDKatch/bsuir-courses/stargazers","contributors_url":"https://api.github.com/repos/DDKatch/bsuir-courses/contributors","subscribers_url":"https://api.github.com/repos/DDKatch/bsuir-courses/subscribers","subscription_url":"https://api.github.com/repos/DDKatch/bsuir-courses/subscription","commits_url":"https://api.github.com/repos/DDKatch/bsuir-courses/commits{/sha}","git_commits_url":"https://api.github.com/repos/DDKatch/bsuir-courses/git/commits{/sha}","comments_url":"https://api.github.com/repos/DDKatch/bsuir-courses/comments{/number}","issue_comment_url":"https://api.github.com/repos/DDKatch/bsuir-courses/issues/comments{/number}","contents_url":"https://api.github.com/repos/DDKatch/bsuir-courses/contents/{+path}","compare_url":"https://api.github.com/repos/DDKatch/bsuir-courses/compare/{base}...{head}","merges_url":"https://api.github.com/repos/DDKatch/bsuir-courses/merges","archive_url":"https://api.github.com/repos/DDKatch/bsuir-courses/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/DDKatch/bsuir-courses/downloads","issues_url":"https://api.github.com/repos/DDKatch/bsuir-courses/issues{/number}","pulls_url":"https://api.github.com/repos/DDKatch/bsuir-courses/pulls{/number}","milestones_url":"https://api.github.com/repos/DDKatch/bsuir-courses/milestones{/number}","notifications_url":"https://api.github.com/repos/DDKatch/bsuir-courses/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/DDKatch/bsuir-courses/labels{/name}","releases_url":"https://api.github.com/repos/DDKatch/bsuir-courses/releases{/id}","deployments_url":"https://api.github.com/repos/DDKatch/bsuir-courses/deployments","created_at":"2016-10-18T16:13:06Z","updated_at":"2016-10-18T16:13:09Z","pushed_at":"2016-10-31T19:03:04Z","git_url":"git://github.com/DDKatch/bsuir-courses.git","ssh_url":"git@github.com:DDKatch/bsuir-courses.git","clone_url":"https://github.com/DDKatch/bsuir-courses.git","svn_url":"https://github.com/DDKatch/bsuir-courses","homepage":null,"size":2086,"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":"rubyroidlabs:master","ref":"master","sha":"1b9821cda9efc395caffc2717d302e2bf4f63dc7","user":{"login":"rubyroidlabs","id":5137565,"avatar_url":"https://avatars.githubusercontent.com/u/5137565?v=3","gravatar_id":"","url":"https://api.github.com/users/rubyroidlabs","html_url":"https://github.com/rubyroidlabs","followers_url":"https://api.github.com/users/rubyroidlabs/followers","following_url":"https://api.github.com/users/rubyroidlabs/following{/other_user}","gists_url":"https://api.github.com/users/rubyroidlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/rubyroidlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rubyroidlabs/subscriptions","organizations_url":"https://api.github.com/users/rubyroidlabs/orgs","repos_url":"https://api.github.com/users/rubyroidlabs/repos","events_url":"https://api.github.com/users/rubyroidlabs/events{/privacy}","received_events_url":"https://api.github.com/users/rubyroidlabs/received_events","type":"Organization","site_admin":false},"repo":{"id":14405320,"name":"bsuir-courses","full_name":"rubyroidlabs/bsuir-courses","owner":{"login":"rubyroidlabs","id":5137565,"avatar_url":"https://avatars.githubusercontent.com/u/5137565?v=3","gravatar_id":"","url":"https://api.github.com/users/rubyroidlabs","html_url":"https://github.com/rubyroidlabs","followers_url":"https://api.github.com/users/rubyroidlabs/followers","following_url":"https://api.github.com/users/rubyroidlabs/following{/other_user}","gists_url":"https://api.github.com/users/rubyroidlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/rubyroidlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rubyroidlabs/subscriptions","organizations_url":"https://api.github.com/users/rubyroidlabs/orgs","repos_url":"https://api.github.com/users/rubyroidlabs/repos","events_url":"https://api.github.com/users/rubyroidlabs/events{/privacy}","received_events_url":"https://api.github.com/users/rubyroidlabs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/rubyroidlabs/bsuir-courses","description":"This is common repository for all student to submit all their homeworks","fork":false,"url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses","forks_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/forks","keys_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/teams","hooks_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/hooks","issue_events_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/issues/events{/number}","events_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/events","assignees_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/assignees{/user}","branches_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/branches{/branch}","tags_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/tags","blobs_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/git/refs{/sha}","trees_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/statuses/{sha}","languages_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/languages","stargazers_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/stargazers","contributors_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/contributors","subscribers_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/subscribers","subscription_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/subscription","commits_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/commits{/sha}","git_commits_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/git/commits{/sha}","comments_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/comments{/number}","issue_comment_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/issues/comments{/number}","contents_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/contents/{+path}","compare_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/merges","archive_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/downloads","issues_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/issues{/number}","pulls_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/pulls{/number}","milestones_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/milestones{/number}","notifications_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/labels{/name}","releases_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/releases{/id}","deployments_url":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/deployments","created_at":"2013-11-14T19:55:12Z","updated_at":"2016-10-26T21:04:00Z","pushed_at":"2016-10-31T19:06:00Z","git_url":"git://github.com/rubyroidlabs/bsuir-courses.git","ssh_url":"git@github.com:rubyroidlabs/bsuir-courses.git","clone_url":"https://github.com/rubyroidlabs/bsuir-courses.git","svn_url":"https://github.com/rubyroidlabs/bsuir-courses","homepage":null,"size":7080,"stargazers_count":29,"watchers_count":29,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":174,"mirror_url":null,"open_issues_count":27,"forks":174,"open_issues":27,"watchers":29,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/pulls/486"},"html":{"href":"https://github.com/rubyroidlabs/bsuir-courses/pull/486"},"issue":{"href":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/issues/486"},"comments":{"href":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/issues/486/comments"},"review_comments":{"href":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/pulls/486/comments"},"review_comment":{"href":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/pulls/486/commits"},"statuses":{"href":"https://api.github.com/repos/rubyroidlabs/bsuir-courses/statuses/caf41580d7ebe5354a64bff959fcc5eb941f927d"}}}}
{"actor":{"display_login":"houndci-bot"}}