{"action":"created","comment":{"url":"https://api.github.com/repos/src-d/lookout/pulls/comments/233934490","pull_request_review_id":175463858,"id":233934490,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzMzkzNDQ5MA==","diff_hunk":"@@ -111,7 +115,7 @@ func (s *Server) HandleEvent(ctx context.Context, e lookout.Event) error {\n }\n \n // HandleReview sends request to analyzers concurrently\n-func (s *Server) HandleReview(ctx context.Context, e *lookout.ReviewEvent) error {\n+func (s *Server) HandleReview(ctx context.Context, e *lookout.ReviewEvent, safePosting bool) error {","path":"server/server.go","position":23,"original_position":23,"commit_id":"65ca2e6a9cf1d8a20ceee5d48282b8dd1da2174f","original_commit_id":"65ca2e6a9cf1d8a20ceee5d48282b8dd1da2174f","user":{"login":"lookout-staging[bot]","id":43474054,"node_id":"MDM6Qm90NDM0NzQwNTQ=","avatar_url":"https://avatars2.githubusercontent.com/u/15128793?v=4","gravatar_id":"","url":"https://api.github.com/users/lookout-staging%5Bbot%5D","html_url":"https://github.com/apps/lookout-staging","followers_url":"https://api.github.com/users/lookout-staging%5Bbot%5D/followers","following_url":"https://api.github.com/users/lookout-staging%5Bbot%5D/following{/other_user}","gists_url":"https://api.github.com/users/lookout-staging%5Bbot%5D/gists{/gist_id}","starred_url":"https://api.github.com/users/lookout-staging%5Bbot%5D/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lookout-staging%5Bbot%5D/subscriptions","organizations_url":"https://api.github.com/users/lookout-staging%5Bbot%5D/orgs","repos_url":"https://api.github.com/users/lookout-staging%5Bbot%5D/repos","events_url":"https://api.github.com/users/lookout-staging%5Bbot%5D/events{/privacy}","received_events_url":"https://api.github.com/users/lookout-staging%5Bbot%5D/received_events","type":"Bot","site_admin":false},"body":"duplicate of server/server.go:166-210 (dupl)\n\n_If you have feedback about this comment, please, [tell us](https://github.com/src-d/lookout-gometalint-analyzer/issues/new)._","created_at":"2018-11-15T17:16:52Z","updated_at":"2018-11-15T17:16:53Z","html_url":"https://github.com/src-d/lookout/pull/356#discussion_r233934490","pull_request_url":"https://api.github.com/repos/src-d/lookout/pulls/356","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/src-d/lookout/pulls/comments/233934490"},"html":{"href":"https://github.com/src-d/lookout/pull/356#discussion_r233934490"},"pull_request":{"href":"https://api.github.com/repos/src-d/lookout/pulls/356"}}},"pull_request":{"url":"https://api.github.com/repos/src-d/lookout/pulls/356","id":231272432,"node_id":"MDExOlB1bGxSZXF1ZXN0MjMxMjcyNDMy","html_url":"https://github.com/src-d/lookout/pull/356","diff_url":"https://github.com/src-d/lookout/pull/356.diff","patch_url":"https://github.com/src-d/lookout/pull/356.patch","issue_url":"https://api.github.com/repos/src-d/lookout/issues/356","number":356,"state":"open","locked":false,"title":"[WIP] Better review comments","user":{"login":"smacker","id":406916,"node_id":"MDQ6VXNlcjQwNjkxNg==","avatar_url":"https://avatars0.githubusercontent.com/u/406916?v=4","gravatar_id":"","url":"https://api.github.com/users/smacker","html_url":"https://github.com/smacker","followers_url":"https://api.github.com/users/smacker/followers","following_url":"https://api.github.com/users/smacker/following{/other_user}","gists_url":"https://api.github.com/users/smacker/gists{/gist_id}","starred_url":"https://api.github.com/users/smacker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smacker/subscriptions","organizations_url":"https://api.github.com/users/smacker/orgs","repos_url":"https://api.github.com/users/smacker/repos","events_url":"https://api.github.com/users/smacker/events{/privacy}","received_events_url":"https://api.github.com/users/smacker/received_events","type":"User","site_admin":false},"body":"Fix #280 but differently from the description in the issue.\r\n\r\nWorking on the original proposal I realized it would require to complicate interfaces a lot.\r\nPoster must return remoteID, add new methods.\r\nStorage interfaces become much more complicated due to the need for transactions across different storages.\r\n\r\nHere is different proposal implementation:\r\n1. Poster should implement \"safe\" mode if it's applicable\r\n2. I introduced new status for events that reflects posting was started but not finished. In such case server uses \"safe\" mode.\r\n\r\nThere are few more fixes:\r\n1. Add sleep when posting many comments or we hit the same error (was submitted too quickly)\r\n2. Transport to fix (unify) non-standard errors from review endpoint to normal once. So when we get an error we can actually see the response from GH and log it. (currently such errors logged as empty structures)","created_at":"2018-11-15T17:16:27Z","updated_at":"2018-11-15T17:16:53Z","closed_at":null,"merged_at":null,"merge_commit_sha":"79222dcc347bd1c7566ebeea8f963c2e479c1e4e","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/src-d/lookout/pulls/356/commits","review_comments_url":"https://api.github.com/repos/src-d/lookout/pulls/356/comments","review_comment_url":"https://api.github.com/repos/src-d/lookout/pulls/comments{/number}","comments_url":"https://api.github.com/repos/src-d/lookout/issues/356/comments","statuses_url":"https://api.github.com/repos/src-d/lookout/statuses/65ca2e6a9cf1d8a20ceee5d48282b8dd1da2174f","head":{"label":"smacker:better_review_comments","ref":"better_review_comments","sha":"65ca2e6a9cf1d8a20ceee5d48282b8dd1da2174f","user":{"login":"smacker","id":406916,"node_id":"MDQ6VXNlcjQwNjkxNg==","avatar_url":"https://avatars0.githubusercontent.com/u/406916?v=4","gravatar_id":"","url":"https://api.github.com/users/smacker","html_url":"https://github.com/smacker","followers_url":"https://api.github.com/users/smacker/followers","following_url":"https://api.github.com/users/smacker/following{/other_user}","gists_url":"https://api.github.com/users/smacker/gists{/gist_id}","starred_url":"https://api.github.com/users/smacker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smacker/subscriptions","organizations_url":"https://api.github.com/users/smacker/orgs","repos_url":"https://api.github.com/users/smacker/repos","events_url":"https://api.github.com/users/smacker/events{/privacy}","received_events_url":"https://api.github.com/users/smacker/received_events","type":"User","site_admin":false},"repo":{"id":141125469,"node_id":"MDEwOlJlcG9zaXRvcnkxNDExMjU0Njk=","name":"lookout","full_name":"smacker/lookout","private":false,"owner":{"login":"smacker","id":406916,"node_id":"MDQ6VXNlcjQwNjkxNg==","avatar_url":"https://avatars0.githubusercontent.com/u/406916?v=4","gravatar_id":"","url":"https://api.github.com/users/smacker","html_url":"https://github.com/smacker","followers_url":"https://api.github.com/users/smacker/followers","following_url":"https://api.github.com/users/smacker/following{/other_user}","gists_url":"https://api.github.com/users/smacker/gists{/gist_id}","starred_url":"https://api.github.com/users/smacker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smacker/subscriptions","organizations_url":"https://api.github.com/users/smacker/orgs","repos_url":"https://api.github.com/users/smacker/repos","events_url":"https://api.github.com/users/smacker/events{/privacy}","received_events_url":"https://api.github.com/users/smacker/received_events","type":"User","site_admin":false},"html_url":"https://github.com/smacker/lookout","description":"Just a prototype, nothing very relevant.","fork":true,"url":"https://api.github.com/repos/smacker/lookout","forks_url":"https://api.github.com/repos/smacker/lookout/forks","keys_url":"https://api.github.com/repos/smacker/lookout/keys{/key_id}","collaborators_url":"https://api.github.com/repos/smacker/lookout/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/smacker/lookout/teams","hooks_url":"https://api.github.com/repos/smacker/lookout/hooks","issue_events_url":"https://api.github.com/repos/smacker/lookout/issues/events{/number}","events_url":"https://api.github.com/repos/smacker/lookout/events","assignees_url":"https://api.github.com/repos/smacker/lookout/assignees{/user}","branches_url":"https://api.github.com/repos/smacker/lookout/branches{/branch}","tags_url":"https://api.github.com/repos/smacker/lookout/tags","blobs_url":"https://api.github.com/repos/smacker/lookout/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/smacker/lookout/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/smacker/lookout/git/refs{/sha}","trees_url":"https://api.github.com/repos/smacker/lookout/git/trees{/sha}","statuses_url":"https://api.github.com/repos/smacker/lookout/statuses/{sha}","languages_url":"https://api.github.com/repos/smacker/lookout/languages","stargazers_url":"https://api.github.com/repos/smacker/lookout/stargazers","contributors_url":"https://api.github.com/repos/smacker/lookout/contributors","subscribers_url":"https://api.github.com/repos/smacker/lookout/subscribers","subscription_url":"https://api.github.com/repos/smacker/lookout/subscription","commits_url":"https://api.github.com/repos/smacker/lookout/commits{/sha}","git_commits_url":"https://api.github.com/repos/smacker/lookout/git/commits{/sha}","comments_url":"https://api.github.com/repos/smacker/lookout/comments{/number}","issue_comment_url":"https://api.github.com/repos/smacker/lookout/issues/comments{/number}","contents_url":"https://api.github.com/repos/smacker/lookout/contents/{+path}","compare_url":"https://api.github.com/repos/smacker/lookout/compare/{base}...{head}","merges_url":"https://api.github.com/repos/smacker/lookout/merges","archive_url":"https://api.github.com/repos/smacker/lookout/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/smacker/lookout/downloads","issues_url":"https://api.github.com/repos/smacker/lookout/issues{/number}","pulls_url":"https://api.github.com/repos/smacker/lookout/pulls{/number}","milestones_url":"https://api.github.com/repos/smacker/lookout/milestones{/number}","notifications_url":"https://api.github.com/repos/smacker/lookout/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/smacker/lookout/labels{/name}","releases_url":"https://api.github.com/repos/smacker/lookout/releases{/id}","deployments_url":"https://api.github.com/repos/smacker/lookout/deployments","created_at":"2018-07-16T10:47:18Z","updated_at":"2018-07-16T10:47:20Z","pushed_at":"2018-11-15T17:06:04Z","git_url":"git://github.com/smacker/lookout.git","ssh_url":"git@github.com:smacker/lookout.git","clone_url":"https://github.com/smacker/lookout.git","svn_url":"https://github.com/smacker/lookout","homepage":"","size":54100,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"src-d:master","ref":"master","sha":"d34065444d02a6167426a6ec83af5a079c0c78d3","user":{"login":"src-d","id":15128793,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE1MTI4Nzkz","avatar_url":"https://avatars2.githubusercontent.com/u/15128793?v=4","gravatar_id":"","url":"https://api.github.com/users/src-d","html_url":"https://github.com/src-d","followers_url":"https://api.github.com/users/src-d/followers","following_url":"https://api.github.com/users/src-d/following{/other_user}","gists_url":"https://api.github.com/users/src-d/gists{/gist_id}","starred_url":"https://api.github.com/users/src-d/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/src-d/subscriptions","organizations_url":"https://api.github.com/users/src-d/orgs","repos_url":"https://api.github.com/users/src-d/repos","events_url":"https://api.github.com/users/src-d/events{/privacy}","received_events_url":"https://api.github.com/users/src-d/received_events","type":"Organization","site_admin":false},"repo":{"id":136146572,"node_id":"MDEwOlJlcG9zaXRvcnkxMzYxNDY1NzI=","name":"lookout","full_name":"src-d/lookout","private":false,"owner":{"login":"src-d","id":15128793,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE1MTI4Nzkz","avatar_url":"https://avatars2.githubusercontent.com/u/15128793?v=4","gravatar_id":"","url":"https://api.github.com/users/src-d","html_url":"https://github.com/src-d","followers_url":"https://api.github.com/users/src-d/followers","following_url":"https://api.github.com/users/src-d/following{/other_user}","gists_url":"https://api.github.com/users/src-d/gists{/gist_id}","starred_url":"https://api.github.com/users/src-d/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/src-d/subscriptions","organizations_url":"https://api.github.com/users/src-d/orgs","repos_url":"https://api.github.com/users/src-d/repos","events_url":"https://api.github.com/users/src-d/events{/privacy}","received_events_url":"https://api.github.com/users/src-d/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/src-d/lookout","description":"Assisted Code Review","fork":false,"url":"https://api.github.com/repos/src-d/lookout","forks_url":"https://api.github.com/repos/src-d/lookout/forks","keys_url":"https://api.github.com/repos/src-d/lookout/keys{/key_id}","collaborators_url":"https://api.github.com/repos/src-d/lookout/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/src-d/lookout/teams","hooks_url":"https://api.github.com/repos/src-d/lookout/hooks","issue_events_url":"https://api.github.com/repos/src-d/lookout/issues/events{/number}","events_url":"https://api.github.com/repos/src-d/lookout/events","assignees_url":"https://api.github.com/repos/src-d/lookout/assignees{/user}","branches_url":"https://api.github.com/repos/src-d/lookout/branches{/branch}","tags_url":"https://api.github.com/repos/src-d/lookout/tags","blobs_url":"https://api.github.com/repos/src-d/lookout/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/src-d/lookout/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/src-d/lookout/git/refs{/sha}","trees_url":"https://api.github.com/repos/src-d/lookout/git/trees{/sha}","statuses_url":"https://api.github.com/repos/src-d/lookout/statuses/{sha}","languages_url":"https://api.github.com/repos/src-d/lookout/languages","stargazers_url":"https://api.github.com/repos/src-d/lookout/stargazers","contributors_url":"https://api.github.com/repos/src-d/lookout/contributors","subscribers_url":"https://api.github.com/repos/src-d/lookout/subscribers","subscription_url":"https://api.github.com/repos/src-d/lookout/subscription","commits_url":"https://api.github.com/repos/src-d/lookout/commits{/sha}","git_commits_url":"https://api.github.com/repos/src-d/lookout/git/commits{/sha}","comments_url":"https://api.github.com/repos/src-d/lookout/comments{/number}","issue_comment_url":"https://api.github.com/repos/src-d/lookout/issues/comments{/number}","contents_url":"https://api.github.com/repos/src-d/lookout/contents/{+path}","compare_url":"https://api.github.com/repos/src-d/lookout/compare/{base}...{head}","merges_url":"https://api.github.com/repos/src-d/lookout/merges","archive_url":"https://api.github.com/repos/src-d/lookout/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/src-d/lookout/downloads","issues_url":"https://api.github.com/repos/src-d/lookout/issues{/number}","pulls_url":"https://api.github.com/repos/src-d/lookout/pulls{/number}","milestones_url":"https://api.github.com/repos/src-d/lookout/milestones{/number}","notifications_url":"https://api.github.com/repos/src-d/lookout/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/src-d/lookout/labels{/name}","releases_url":"https://api.github.com/repos/src-d/lookout/releases{/id}","deployments_url":"https://api.github.com/repos/src-d/lookout/deployments","created_at":"2018-06-05T08:37:23Z","updated_at":"2018-11-14T16:01:54Z","pushed_at":"2018-11-15T17:16:28Z","git_url":"git://github.com/src-d/lookout.git","ssh_url":"git@github.com:src-d/lookout.git","clone_url":"https://github.com/src-d/lookout.git","svn_url":"https://github.com/src-d/lookout","homepage":"","size":54092,"stargazers_count":63,"watchers_count":63,"language":"Go","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":19,"mirror_url":null,"archived":false,"open_issues_count":39,"license":{"key":"agpl-3.0","name":"GNU Affero General Public License v3.0","spdx_id":"AGPL-3.0","url":"https://api.github.com/licenses/agpl-3.0","node_id":"MDc6TGljZW5zZTE="},"forks":19,"open_issues":39,"watchers":63,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/src-d/lookout/pulls/356"},"html":{"href":"https://github.com/src-d/lookout/pull/356"},"issue":{"href":"https://api.github.com/repos/src-d/lookout/issues/356"},"comments":{"href":"https://api.github.com/repos/src-d/lookout/issues/356/comments"},"review_comments":{"href":"https://api.github.com/repos/src-d/lookout/pulls/356/comments"},"review_comment":{"href":"https://api.github.com/repos/src-d/lookout/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/src-d/lookout/pulls/356/commits"},"statuses":{"href":"https://api.github.com/repos/src-d/lookout/statuses/65ca2e6a9cf1d8a20ceee5d48282b8dd1da2174f"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"lookout-staging"}}