{"action":"created","comment":{"url":"https://api.github.com/repos/ArkusCode/TestGuru/pulls/comments/209829593","pull_request_review_id":145917159,"id":209829593,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwOTgyOTU5Mw==","diff_hunk":"@@ -0,0 +1,31 @@\n+class GistQuestionService\n+\n+  def initialize(question, client: nil)\n+    @question = question\n+    @test = @question.test\n+    @client = client || Octokit::Client.new(access_token: ENV['GITHUB_TOKEN'])\n+  end\n+\n+  def call\n+    @client.create_gist(gist_params)\n+  end\n+\n+  private\n+\n+  def gist_params\n+    {\n+      description: I18n.t('.gist', test_title: @test.title),\n+      files: {\n+        'test-guru-questions.txt' => {\n+          content: gist_content\n+        }\n+      }\n+    }\n+  end\n+\n+  def gist_content","path":"app/services/gist_question_service.rb","position":26,"original_position":26,"commit_id":"9c349a3b278fe420f025d3f933577754c612efa8","original_commit_id":"9c349a3b278fe420f025d3f933577754c612efa8","user":{"login":"iBublik","id":11278497,"node_id":"MDQ6VXNlcjExMjc4NDk3","avatar_url":"https://avatars1.githubusercontent.com/u/11278497?v=4","gravatar_id":"","url":"https://api.github.com/users/iBublik","html_url":"https://github.com/iBublik","followers_url":"https://api.github.com/users/iBublik/followers","following_url":"https://api.github.com/users/iBublik/following{/other_user}","gists_url":"https://api.github.com/users/iBublik/gists{/gist_id}","starred_url":"https://api.github.com/users/iBublik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iBublik/subscriptions","organizations_url":"https://api.github.com/users/iBublik/orgs","repos_url":"https://api.github.com/users/iBublik/repos","events_url":"https://api.github.com/users/iBublik/events{/privacy}","received_events_url":"https://api.github.com/users/iBublik/received_events","type":"User","site_admin":false},"body":"Можно сделать метод посимпатичнее - `[@question.body, *@question.answers.pluck(:body)].join(\"\\n\")`","created_at":"2018-08-14T05:04:53Z","updated_at":"2018-08-14T05:09:01Z","html_url":"https://github.com/ArkusCode/TestGuru/pull/14#discussion_r209829593","pull_request_url":"https://api.github.com/repos/ArkusCode/TestGuru/pulls/14","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/ArkusCode/TestGuru/pulls/comments/209829593"},"html":{"href":"https://github.com/ArkusCode/TestGuru/pull/14#discussion_r209829593"},"pull_request":{"href":"https://api.github.com/repos/ArkusCode/TestGuru/pulls/14"}}},"pull_request":{"url":"https://api.github.com/repos/ArkusCode/TestGuru/pulls/14","id":208115815,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA4MTE1ODE1","html_url":"https://github.com/ArkusCode/TestGuru/pull/14","diff_url":"https://github.com/ArkusCode/TestGuru/pull/14.diff","patch_url":"https://github.com/ArkusCode/TestGuru/pull/14.patch","issue_url":"https://api.github.com/repos/ArkusCode/TestGuru/issues/14","number":14,"state":"open","locked":false,"title":"Lesson13 first commit","user":{"login":"ArkusCode","id":39348757,"node_id":"MDQ6VXNlcjM5MzQ4NzU3","avatar_url":"https://avatars2.githubusercontent.com/u/39348757?v=4","gravatar_id":"","url":"https://api.github.com/users/ArkusCode","html_url":"https://github.com/ArkusCode","followers_url":"https://api.github.com/users/ArkusCode/followers","following_url":"https://api.github.com/users/ArkusCode/following{/other_user}","gists_url":"https://api.github.com/users/ArkusCode/gists{/gist_id}","starred_url":"https://api.github.com/users/ArkusCode/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ArkusCode/subscriptions","organizations_url":"https://api.github.com/users/ArkusCode/orgs","repos_url":"https://api.github.com/users/ArkusCode/repos","events_url":"https://api.github.com/users/ArkusCode/events{/privacy}","received_events_url":"https://api.github.com/users/ArkusCode/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-08-13T21:58:15Z","updated_at":"2018-08-14T05:09:01Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d00086caab4c2936af316acba55cab6004659053","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/ArkusCode/TestGuru/pulls/14/commits","review_comments_url":"https://api.github.com/repos/ArkusCode/TestGuru/pulls/14/comments","review_comment_url":"https://api.github.com/repos/ArkusCode/TestGuru/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ArkusCode/TestGuru/issues/14/comments","statuses_url":"https://api.github.com/repos/ArkusCode/TestGuru/statuses/9c349a3b278fe420f025d3f933577754c612efa8","head":{"label":"ArkusCode:Lesson13","ref":"Lesson13","sha":"9c349a3b278fe420f025d3f933577754c612efa8","user":{"login":"ArkusCode","id":39348757,"node_id":"MDQ6VXNlcjM5MzQ4NzU3","avatar_url":"https://avatars2.githubusercontent.com/u/39348757?v=4","gravatar_id":"","url":"https://api.github.com/users/ArkusCode","html_url":"https://github.com/ArkusCode","followers_url":"https://api.github.com/users/ArkusCode/followers","following_url":"https://api.github.com/users/ArkusCode/following{/other_user}","gists_url":"https://api.github.com/users/ArkusCode/gists{/gist_id}","starred_url":"https://api.github.com/users/ArkusCode/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ArkusCode/subscriptions","organizations_url":"https://api.github.com/users/ArkusCode/orgs","repos_url":"https://api.github.com/users/ArkusCode/repos","events_url":"https://api.github.com/users/ArkusCode/events{/privacy}","received_events_url":"https://api.github.com/users/ArkusCode/received_events","type":"User","site_admin":false},"repo":{"id":138493521,"node_id":"MDEwOlJlcG9zaXRvcnkxMzg0OTM1MjE=","name":"TestGuru","full_name":"ArkusCode/TestGuru","owner":{"login":"ArkusCode","id":39348757,"node_id":"MDQ6VXNlcjM5MzQ4NzU3","avatar_url":"https://avatars2.githubusercontent.com/u/39348757?v=4","gravatar_id":"","url":"https://api.github.com/users/ArkusCode","html_url":"https://github.com/ArkusCode","followers_url":"https://api.github.com/users/ArkusCode/followers","following_url":"https://api.github.com/users/ArkusCode/following{/other_user}","gists_url":"https://api.github.com/users/ArkusCode/gists{/gist_id}","starred_url":"https://api.github.com/users/ArkusCode/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ArkusCode/subscriptions","organizations_url":"https://api.github.com/users/ArkusCode/orgs","repos_url":"https://api.github.com/users/ArkusCode/repos","events_url":"https://api.github.com/users/ArkusCode/events{/privacy}","received_events_url":"https://api.github.com/users/ArkusCode/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ArkusCode/TestGuru","description":"TestGuru app","fork":false,"url":"https://api.github.com/repos/ArkusCode/TestGuru","forks_url":"https://api.github.com/repos/ArkusCode/TestGuru/forks","keys_url":"https://api.github.com/repos/ArkusCode/TestGuru/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ArkusCode/TestGuru/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ArkusCode/TestGuru/teams","hooks_url":"https://api.github.com/repos/ArkusCode/TestGuru/hooks","issue_events_url":"https://api.github.com/repos/ArkusCode/TestGuru/issues/events{/number}","events_url":"https://api.github.com/repos/ArkusCode/TestGuru/events","assignees_url":"https://api.github.com/repos/ArkusCode/TestGuru/assignees{/user}","branches_url":"https://api.github.com/repos/ArkusCode/TestGuru/branches{/branch}","tags_url":"https://api.github.com/repos/ArkusCode/TestGuru/tags","blobs_url":"https://api.github.com/repos/ArkusCode/TestGuru/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ArkusCode/TestGuru/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ArkusCode/TestGuru/git/refs{/sha}","trees_url":"https://api.github.com/repos/ArkusCode/TestGuru/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ArkusCode/TestGuru/statuses/{sha}","languages_url":"https://api.github.com/repos/ArkusCode/TestGuru/languages","stargazers_url":"https://api.github.com/repos/ArkusCode/TestGuru/stargazers","contributors_url":"https://api.github.com/repos/ArkusCode/TestGuru/contributors","subscribers_url":"https://api.github.com/repos/ArkusCode/TestGuru/subscribers","subscription_url":"https://api.github.com/repos/ArkusCode/TestGuru/subscription","commits_url":"https://api.github.com/repos/ArkusCode/TestGuru/commits{/sha}","git_commits_url":"https://api.github.com/repos/ArkusCode/TestGuru/git/commits{/sha}","comments_url":"https://api.github.com/repos/ArkusCode/TestGuru/comments{/number}","issue_comment_url":"https://api.github.com/repos/ArkusCode/TestGuru/issues/comments{/number}","contents_url":"https://api.github.com/repos/ArkusCode/TestGuru/contents/{+path}","compare_url":"https://api.github.com/repos/ArkusCode/TestGuru/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ArkusCode/TestGuru/merges","archive_url":"https://api.github.com/repos/ArkusCode/TestGuru/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ArkusCode/TestGuru/downloads","issues_url":"https://api.github.com/repos/ArkusCode/TestGuru/issues{/number}","pulls_url":"https://api.github.com/repos/ArkusCode/TestGuru/pulls{/number}","milestones_url":"https://api.github.com/repos/ArkusCode/TestGuru/milestones{/number}","notifications_url":"https://api.github.com/repos/ArkusCode/TestGuru/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ArkusCode/TestGuru/labels{/name}","releases_url":"https://api.github.com/repos/ArkusCode/TestGuru/releases{/id}","deployments_url":"https://api.github.com/repos/ArkusCode/TestGuru/deployments","created_at":"2018-06-24T15:31:00Z","updated_at":"2018-08-12T07:15:06Z","pushed_at":"2018-08-13T21:58:15Z","git_url":"git://github.com/ArkusCode/TestGuru.git","ssh_url":"git@github.com:ArkusCode/TestGuru.git","clone_url":"https://github.com/ArkusCode/TestGuru.git","svn_url":"https://github.com/ArkusCode/TestGuru","homepage":null,"size":168,"stargazers_count":1,"watchers_count":1,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":0,"open_issues":1,"watchers":1,"default_branch":"master"}},"base":{"label":"ArkusCode:master","ref":"master","sha":"09d59f3e379c4e350c4c438f842bee168aa60e8f","user":{"login":"ArkusCode","id":39348757,"node_id":"MDQ6VXNlcjM5MzQ4NzU3","avatar_url":"https://avatars2.githubusercontent.com/u/39348757?v=4","gravatar_id":"","url":"https://api.github.com/users/ArkusCode","html_url":"https://github.com/ArkusCode","followers_url":"https://api.github.com/users/ArkusCode/followers","following_url":"https://api.github.com/users/ArkusCode/following{/other_user}","gists_url":"https://api.github.com/users/ArkusCode/gists{/gist_id}","starred_url":"https://api.github.com/users/ArkusCode/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ArkusCode/subscriptions","organizations_url":"https://api.github.com/users/ArkusCode/orgs","repos_url":"https://api.github.com/users/ArkusCode/repos","events_url":"https://api.github.com/users/ArkusCode/events{/privacy}","received_events_url":"https://api.github.com/users/ArkusCode/received_events","type":"User","site_admin":false},"repo":{"id":138493521,"node_id":"MDEwOlJlcG9zaXRvcnkxMzg0OTM1MjE=","name":"TestGuru","full_name":"ArkusCode/TestGuru","owner":{"login":"ArkusCode","id":39348757,"node_id":"MDQ6VXNlcjM5MzQ4NzU3","avatar_url":"https://avatars2.githubusercontent.com/u/39348757?v=4","gravatar_id":"","url":"https://api.github.com/users/ArkusCode","html_url":"https://github.com/ArkusCode","followers_url":"https://api.github.com/users/ArkusCode/followers","following_url":"https://api.github.com/users/ArkusCode/following{/other_user}","gists_url":"https://api.github.com/users/ArkusCode/gists{/gist_id}","starred_url":"https://api.github.com/users/ArkusCode/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ArkusCode/subscriptions","organizations_url":"https://api.github.com/users/ArkusCode/orgs","repos_url":"https://api.github.com/users/ArkusCode/repos","events_url":"https://api.github.com/users/ArkusCode/events{/privacy}","received_events_url":"https://api.github.com/users/ArkusCode/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ArkusCode/TestGuru","description":"TestGuru app","fork":false,"url":"https://api.github.com/repos/ArkusCode/TestGuru","forks_url":"https://api.github.com/repos/ArkusCode/TestGuru/forks","keys_url":"https://api.github.com/repos/ArkusCode/TestGuru/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ArkusCode/TestGuru/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ArkusCode/TestGuru/teams","hooks_url":"https://api.github.com/repos/ArkusCode/TestGuru/hooks","issue_events_url":"https://api.github.com/repos/ArkusCode/TestGuru/issues/events{/number}","events_url":"https://api.github.com/repos/ArkusCode/TestGuru/events","assignees_url":"https://api.github.com/repos/ArkusCode/TestGuru/assignees{/user}","branches_url":"https://api.github.com/repos/ArkusCode/TestGuru/branches{/branch}","tags_url":"https://api.github.com/repos/ArkusCode/TestGuru/tags","blobs_url":"https://api.github.com/repos/ArkusCode/TestGuru/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ArkusCode/TestGuru/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ArkusCode/TestGuru/git/refs{/sha}","trees_url":"https://api.github.com/repos/ArkusCode/TestGuru/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ArkusCode/TestGuru/statuses/{sha}","languages_url":"https://api.github.com/repos/ArkusCode/TestGuru/languages","stargazers_url":"https://api.github.com/repos/ArkusCode/TestGuru/stargazers","contributors_url":"https://api.github.com/repos/ArkusCode/TestGuru/contributors","subscribers_url":"https://api.github.com/repos/ArkusCode/TestGuru/subscribers","subscription_url":"https://api.github.com/repos/ArkusCode/TestGuru/subscription","commits_url":"https://api.github.com/repos/ArkusCode/TestGuru/commits{/sha}","git_commits_url":"https://api.github.com/repos/ArkusCode/TestGuru/git/commits{/sha}","comments_url":"https://api.github.com/repos/ArkusCode/TestGuru/comments{/number}","issue_comment_url":"https://api.github.com/repos/ArkusCode/TestGuru/issues/comments{/number}","contents_url":"https://api.github.com/repos/ArkusCode/TestGuru/contents/{+path}","compare_url":"https://api.github.com/repos/ArkusCode/TestGuru/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ArkusCode/TestGuru/merges","archive_url":"https://api.github.com/repos/ArkusCode/TestGuru/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ArkusCode/TestGuru/downloads","issues_url":"https://api.github.com/repos/ArkusCode/TestGuru/issues{/number}","pulls_url":"https://api.github.com/repos/ArkusCode/TestGuru/pulls{/number}","milestones_url":"https://api.github.com/repos/ArkusCode/TestGuru/milestones{/number}","notifications_url":"https://api.github.com/repos/ArkusCode/TestGuru/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ArkusCode/TestGuru/labels{/name}","releases_url":"https://api.github.com/repos/ArkusCode/TestGuru/releases{/id}","deployments_url":"https://api.github.com/repos/ArkusCode/TestGuru/deployments","created_at":"2018-06-24T15:31:00Z","updated_at":"2018-08-12T07:15:06Z","pushed_at":"2018-08-13T21:58:15Z","git_url":"git://github.com/ArkusCode/TestGuru.git","ssh_url":"git@github.com:ArkusCode/TestGuru.git","clone_url":"https://github.com/ArkusCode/TestGuru.git","svn_url":"https://github.com/ArkusCode/TestGuru","homepage":null,"size":168,"stargazers_count":1,"watchers_count":1,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":0,"open_issues":1,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ArkusCode/TestGuru/pulls/14"},"html":{"href":"https://github.com/ArkusCode/TestGuru/pull/14"},"issue":{"href":"https://api.github.com/repos/ArkusCode/TestGuru/issues/14"},"comments":{"href":"https://api.github.com/repos/ArkusCode/TestGuru/issues/14/comments"},"review_comments":{"href":"https://api.github.com/repos/ArkusCode/TestGuru/pulls/14/comments"},"review_comment":{"href":"https://api.github.com/repos/ArkusCode/TestGuru/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ArkusCode/TestGuru/pulls/14/commits"},"statuses":{"href":"https://api.github.com/repos/ArkusCode/TestGuru/statuses/9c349a3b278fe420f025d3f933577754c612efa8"}},"author_association":"OWNER"}}
{"actor":{"display_login":"iBublik"}}