{"action":"created","comment":{"url":"https://api.github.com/repos/kmaksimovv/TestGuru/pulls/comments/235402661","pull_request_review_id":177256886,"id":235402661,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzNTQwMjY2MQ==","diff_hunk":"@@ -18,9 +18,11 @@ def update\n \n   def gist\n     result = GistQuestionService.new(@test_passage.current_question).call\n-    @gist = current_user.gists.new(question_id: @test_passage.current_question.id, gist_url: result[:html_url])\n-    if @gist.save\n-      redirect_to @test_passage, notice: t('.success', link_to_gists: @gist.gist_url)\n+    if result[:html_url].present?\n+      @gist = current_user.gists.new(question_id: @test_passage.current_question.id, gist_url: result[:html_url])\n+      if @gist.save\n+        redirect_to @test_passage, notice: t('.success', link_to_gists: @gist.gist_url)","path":"app/controllers/test_passages_controller.rb","position":17,"original_position":10,"commit_id":"eba84fdb27efc17a51b8271f78ec61dff32238ec","original_commit_id":"eba84fdb27efc17a51b8271f78ec61dff32238ec","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":"В обоих случаях редирект одинаковый, отличие только во флеш-сообщении. В условиях просто запиши сообщение во флеш, а редирект делай снаружи","created_at":"2018-11-21T14:14:57Z","updated_at":"2018-11-21T14:18:43Z","html_url":"https://github.com/kmaksimovv/TestGuru/pull/14#discussion_r235402661","pull_request_url":"https://api.github.com/repos/kmaksimovv/TestGuru/pulls/14","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/kmaksimovv/TestGuru/pulls/comments/235402661"},"html":{"href":"https://github.com/kmaksimovv/TestGuru/pull/14#discussion_r235402661"},"pull_request":{"href":"https://api.github.com/repos/kmaksimovv/TestGuru/pulls/14"}}},"pull_request":{"url":"https://api.github.com/repos/kmaksimovv/TestGuru/pulls/14","id":231860465,"node_id":"MDExOlB1bGxSZXF1ZXN0MjMxODYwNDY1","html_url":"https://github.com/kmaksimovv/TestGuru/pull/14","diff_url":"https://github.com/kmaksimovv/TestGuru/pull/14.diff","patch_url":"https://github.com/kmaksimovv/TestGuru/pull/14.patch","issue_url":"https://api.github.com/repos/kmaksimovv/TestGuru/issues/14","number":14,"state":"open","locked":false,"title":"Develop API","user":{"login":"kmaksimovv","id":41302676,"node_id":"MDQ6VXNlcjQxMzAyNjc2","avatar_url":"https://avatars3.githubusercontent.com/u/41302676?v=4","gravatar_id":"","url":"https://api.github.com/users/kmaksimovv","html_url":"https://github.com/kmaksimovv","followers_url":"https://api.github.com/users/kmaksimovv/followers","following_url":"https://api.github.com/users/kmaksimovv/following{/other_user}","gists_url":"https://api.github.com/users/kmaksimovv/gists{/gist_id}","starred_url":"https://api.github.com/users/kmaksimovv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kmaksimovv/subscriptions","organizations_url":"https://api.github.com/users/kmaksimovv/orgs","repos_url":"https://api.github.com/users/kmaksimovv/repos","events_url":"https://api.github.com/users/kmaksimovv/events{/privacy}","received_events_url":"https://api.github.com/users/kmaksimovv/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-11-19T05:50:11Z","updated_at":"2018-11-21T14:18:43Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ee230cb19396d4f6bd0db8333bc65d5c07cb85ee","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/kmaksimovv/TestGuru/pulls/14/commits","review_comments_url":"https://api.github.com/repos/kmaksimovv/TestGuru/pulls/14/comments","review_comment_url":"https://api.github.com/repos/kmaksimovv/TestGuru/pulls/comments{/number}","comments_url":"https://api.github.com/repos/kmaksimovv/TestGuru/issues/14/comments","statuses_url":"https://api.github.com/repos/kmaksimovv/TestGuru/statuses/eba84fdb27efc17a51b8271f78ec61dff32238ec","head":{"label":"kmaksimovv:develop-test_guru/part14","ref":"develop-test_guru/part14","sha":"eba84fdb27efc17a51b8271f78ec61dff32238ec","user":{"login":"kmaksimovv","id":41302676,"node_id":"MDQ6VXNlcjQxMzAyNjc2","avatar_url":"https://avatars3.githubusercontent.com/u/41302676?v=4","gravatar_id":"","url":"https://api.github.com/users/kmaksimovv","html_url":"https://github.com/kmaksimovv","followers_url":"https://api.github.com/users/kmaksimovv/followers","following_url":"https://api.github.com/users/kmaksimovv/following{/other_user}","gists_url":"https://api.github.com/users/kmaksimovv/gists{/gist_id}","starred_url":"https://api.github.com/users/kmaksimovv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kmaksimovv/subscriptions","organizations_url":"https://api.github.com/users/kmaksimovv/orgs","repos_url":"https://api.github.com/users/kmaksimovv/repos","events_url":"https://api.github.com/users/kmaksimovv/events{/privacy}","received_events_url":"https://api.github.com/users/kmaksimovv/received_events","type":"User","site_admin":false},"repo":{"id":149283750,"node_id":"MDEwOlJlcG9zaXRvcnkxNDkyODM3NTA=","name":"TestGuru","full_name":"kmaksimovv/TestGuru","private":false,"owner":{"login":"kmaksimovv","id":41302676,"node_id":"MDQ6VXNlcjQxMzAyNjc2","avatar_url":"https://avatars3.githubusercontent.com/u/41302676?v=4","gravatar_id":"","url":"https://api.github.com/users/kmaksimovv","html_url":"https://github.com/kmaksimovv","followers_url":"https://api.github.com/users/kmaksimovv/followers","following_url":"https://api.github.com/users/kmaksimovv/following{/other_user}","gists_url":"https://api.github.com/users/kmaksimovv/gists{/gist_id}","starred_url":"https://api.github.com/users/kmaksimovv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kmaksimovv/subscriptions","organizations_url":"https://api.github.com/users/kmaksimovv/orgs","repos_url":"https://api.github.com/users/kmaksimovv/repos","events_url":"https://api.github.com/users/kmaksimovv/events{/privacy}","received_events_url":"https://api.github.com/users/kmaksimovv/received_events","type":"User","site_admin":false},"html_url":"https://github.com/kmaksimovv/TestGuru","description":"TestGuru","fork":false,"url":"https://api.github.com/repos/kmaksimovv/TestGuru","forks_url":"https://api.github.com/repos/kmaksimovv/TestGuru/forks","keys_url":"https://api.github.com/repos/kmaksimovv/TestGuru/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kmaksimovv/TestGuru/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kmaksimovv/TestGuru/teams","hooks_url":"https://api.github.com/repos/kmaksimovv/TestGuru/hooks","issue_events_url":"https://api.github.com/repos/kmaksimovv/TestGuru/issues/events{/number}","events_url":"https://api.github.com/repos/kmaksimovv/TestGuru/events","assignees_url":"https://api.github.com/repos/kmaksimovv/TestGuru/assignees{/user}","branches_url":"https://api.github.com/repos/kmaksimovv/TestGuru/branches{/branch}","tags_url":"https://api.github.com/repos/kmaksimovv/TestGuru/tags","blobs_url":"https://api.github.com/repos/kmaksimovv/TestGuru/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kmaksimovv/TestGuru/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kmaksimovv/TestGuru/git/refs{/sha}","trees_url":"https://api.github.com/repos/kmaksimovv/TestGuru/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kmaksimovv/TestGuru/statuses/{sha}","languages_url":"https://api.github.com/repos/kmaksimovv/TestGuru/languages","stargazers_url":"https://api.github.com/repos/kmaksimovv/TestGuru/stargazers","contributors_url":"https://api.github.com/repos/kmaksimovv/TestGuru/contributors","subscribers_url":"https://api.github.com/repos/kmaksimovv/TestGuru/subscribers","subscription_url":"https://api.github.com/repos/kmaksimovv/TestGuru/subscription","commits_url":"https://api.github.com/repos/kmaksimovv/TestGuru/commits{/sha}","git_commits_url":"https://api.github.com/repos/kmaksimovv/TestGuru/git/commits{/sha}","comments_url":"https://api.github.com/repos/kmaksimovv/TestGuru/comments{/number}","issue_comment_url":"https://api.github.com/repos/kmaksimovv/TestGuru/issues/comments{/number}","contents_url":"https://api.github.com/repos/kmaksimovv/TestGuru/contents/{+path}","compare_url":"https://api.github.com/repos/kmaksimovv/TestGuru/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kmaksimovv/TestGuru/merges","archive_url":"https://api.github.com/repos/kmaksimovv/TestGuru/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kmaksimovv/TestGuru/downloads","issues_url":"https://api.github.com/repos/kmaksimovv/TestGuru/issues{/number}","pulls_url":"https://api.github.com/repos/kmaksimovv/TestGuru/pulls{/number}","milestones_url":"https://api.github.com/repos/kmaksimovv/TestGuru/milestones{/number}","notifications_url":"https://api.github.com/repos/kmaksimovv/TestGuru/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kmaksimovv/TestGuru/labels{/name}","releases_url":"https://api.github.com/repos/kmaksimovv/TestGuru/releases{/id}","deployments_url":"https://api.github.com/repos/kmaksimovv/TestGuru/deployments","created_at":"2018-09-18T12:21:24Z","updated_at":"2018-11-19T05:30:41Z","pushed_at":"2018-11-21T07:08:51Z","git_url":"git://github.com/kmaksimovv/TestGuru.git","ssh_url":"git@github.com:kmaksimovv/TestGuru.git","clone_url":"https://github.com/kmaksimovv/TestGuru.git","svn_url":"https://github.com/kmaksimovv/TestGuru","homepage":null,"size":164,"stargazers_count":0,"watchers_count":0,"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":0,"default_branch":"master"}},"base":{"label":"kmaksimovv:master","ref":"master","sha":"e65d9d4752ce631cabfd8c58c8d3acb5b85e6587","user":{"login":"kmaksimovv","id":41302676,"node_id":"MDQ6VXNlcjQxMzAyNjc2","avatar_url":"https://avatars3.githubusercontent.com/u/41302676?v=4","gravatar_id":"","url":"https://api.github.com/users/kmaksimovv","html_url":"https://github.com/kmaksimovv","followers_url":"https://api.github.com/users/kmaksimovv/followers","following_url":"https://api.github.com/users/kmaksimovv/following{/other_user}","gists_url":"https://api.github.com/users/kmaksimovv/gists{/gist_id}","starred_url":"https://api.github.com/users/kmaksimovv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kmaksimovv/subscriptions","organizations_url":"https://api.github.com/users/kmaksimovv/orgs","repos_url":"https://api.github.com/users/kmaksimovv/repos","events_url":"https://api.github.com/users/kmaksimovv/events{/privacy}","received_events_url":"https://api.github.com/users/kmaksimovv/received_events","type":"User","site_admin":false},"repo":{"id":149283750,"node_id":"MDEwOlJlcG9zaXRvcnkxNDkyODM3NTA=","name":"TestGuru","full_name":"kmaksimovv/TestGuru","private":false,"owner":{"login":"kmaksimovv","id":41302676,"node_id":"MDQ6VXNlcjQxMzAyNjc2","avatar_url":"https://avatars3.githubusercontent.com/u/41302676?v=4","gravatar_id":"","url":"https://api.github.com/users/kmaksimovv","html_url":"https://github.com/kmaksimovv","followers_url":"https://api.github.com/users/kmaksimovv/followers","following_url":"https://api.github.com/users/kmaksimovv/following{/other_user}","gists_url":"https://api.github.com/users/kmaksimovv/gists{/gist_id}","starred_url":"https://api.github.com/users/kmaksimovv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kmaksimovv/subscriptions","organizations_url":"https://api.github.com/users/kmaksimovv/orgs","repos_url":"https://api.github.com/users/kmaksimovv/repos","events_url":"https://api.github.com/users/kmaksimovv/events{/privacy}","received_events_url":"https://api.github.com/users/kmaksimovv/received_events","type":"User","site_admin":false},"html_url":"https://github.com/kmaksimovv/TestGuru","description":"TestGuru","fork":false,"url":"https://api.github.com/repos/kmaksimovv/TestGuru","forks_url":"https://api.github.com/repos/kmaksimovv/TestGuru/forks","keys_url":"https://api.github.com/repos/kmaksimovv/TestGuru/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kmaksimovv/TestGuru/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kmaksimovv/TestGuru/teams","hooks_url":"https://api.github.com/repos/kmaksimovv/TestGuru/hooks","issue_events_url":"https://api.github.com/repos/kmaksimovv/TestGuru/issues/events{/number}","events_url":"https://api.github.com/repos/kmaksimovv/TestGuru/events","assignees_url":"https://api.github.com/repos/kmaksimovv/TestGuru/assignees{/user}","branches_url":"https://api.github.com/repos/kmaksimovv/TestGuru/branches{/branch}","tags_url":"https://api.github.com/repos/kmaksimovv/TestGuru/tags","blobs_url":"https://api.github.com/repos/kmaksimovv/TestGuru/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kmaksimovv/TestGuru/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kmaksimovv/TestGuru/git/refs{/sha}","trees_url":"https://api.github.com/repos/kmaksimovv/TestGuru/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kmaksimovv/TestGuru/statuses/{sha}","languages_url":"https://api.github.com/repos/kmaksimovv/TestGuru/languages","stargazers_url":"https://api.github.com/repos/kmaksimovv/TestGuru/stargazers","contributors_url":"https://api.github.com/repos/kmaksimovv/TestGuru/contributors","subscribers_url":"https://api.github.com/repos/kmaksimovv/TestGuru/subscribers","subscription_url":"https://api.github.com/repos/kmaksimovv/TestGuru/subscription","commits_url":"https://api.github.com/repos/kmaksimovv/TestGuru/commits{/sha}","git_commits_url":"https://api.github.com/repos/kmaksimovv/TestGuru/git/commits{/sha}","comments_url":"https://api.github.com/repos/kmaksimovv/TestGuru/comments{/number}","issue_comment_url":"https://api.github.com/repos/kmaksimovv/TestGuru/issues/comments{/number}","contents_url":"https://api.github.com/repos/kmaksimovv/TestGuru/contents/{+path}","compare_url":"https://api.github.com/repos/kmaksimovv/TestGuru/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kmaksimovv/TestGuru/merges","archive_url":"https://api.github.com/repos/kmaksimovv/TestGuru/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kmaksimovv/TestGuru/downloads","issues_url":"https://api.github.com/repos/kmaksimovv/TestGuru/issues{/number}","pulls_url":"https://api.github.com/repos/kmaksimovv/TestGuru/pulls{/number}","milestones_url":"https://api.github.com/repos/kmaksimovv/TestGuru/milestones{/number}","notifications_url":"https://api.github.com/repos/kmaksimovv/TestGuru/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kmaksimovv/TestGuru/labels{/name}","releases_url":"https://api.github.com/repos/kmaksimovv/TestGuru/releases{/id}","deployments_url":"https://api.github.com/repos/kmaksimovv/TestGuru/deployments","created_at":"2018-09-18T12:21:24Z","updated_at":"2018-11-19T05:30:41Z","pushed_at":"2018-11-21T07:08:51Z","git_url":"git://github.com/kmaksimovv/TestGuru.git","ssh_url":"git@github.com:kmaksimovv/TestGuru.git","clone_url":"https://github.com/kmaksimovv/TestGuru.git","svn_url":"https://github.com/kmaksimovv/TestGuru","homepage":null,"size":164,"stargazers_count":0,"watchers_count":0,"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":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/kmaksimovv/TestGuru/pulls/14"},"html":{"href":"https://github.com/kmaksimovv/TestGuru/pull/14"},"issue":{"href":"https://api.github.com/repos/kmaksimovv/TestGuru/issues/14"},"comments":{"href":"https://api.github.com/repos/kmaksimovv/TestGuru/issues/14/comments"},"review_comments":{"href":"https://api.github.com/repos/kmaksimovv/TestGuru/pulls/14/comments"},"review_comment":{"href":"https://api.github.com/repos/kmaksimovv/TestGuru/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/kmaksimovv/TestGuru/pulls/14/commits"},"statuses":{"href":"https://api.github.com/repos/kmaksimovv/TestGuru/statuses/eba84fdb27efc17a51b8271f78ec61dff32238ec"}},"author_association":"OWNER"}}
{"actor":{"display_login":"iBublik"}}