{"action":"created","comment":{"url":"https://api.github.com/repos/src-d/gitbase-playground/pulls/comments/189220176","pull_request_review_id":121357746,"id":189220176,"diff_hunk":"@@ -12,66 +11,80 @@ class App extends Component {\n     super(props);\n     this.state = {\n       sql: `SELECT COUNT(*) as num_commits, month, repo_id, committer_email FROM (\n-    SELECT MONTH(committer_when) as month, r.id as repo_id, committer_email\n-    FROM repositories r\n-    INNER JOIN refs ON refs.repository_id = r.id AND refs.name = 'HEAD'\n-    INNER JOIN commits c ON YEAR(committer_when) = 2018 AND history_idx(refs.hash, c.hash) >= 0\n+  SELECT MONTH(committer_when) as month, r.repository_id as repo_id, committer_email\n+  FROM repositories r\n+  INNER JOIN refs ON refs.repository_id = r.repository_id AND refs.ref_name = 'HEAD'\n+  INNER JOIN commits c ON YEAR(committer_when) = 2018 AND history_idx(refs.commit_hash, c.commit_hash) >= 0\n ) as t\n GROUP BY committer_email, month, repo_id`,\n-      response: undefined,\n-      loading: false,\n-      error: undefined\n+      results: new Map()\n     };\n \n     this.handleTextChange = this.handleTextChange.bind(this);\n     this.handleSubmit = this.handleSubmit.bind(this);\n+    this.handleRemoveResult = this.handleRemoveResult.bind(this);\n+\n+    this.uniqueKey = 0;\n   }\n \n   handleTextChange(text) {\n     this.setState({ sql: text });\n   }\n \n   handleSubmit() {\n-    this.setState({\n-      response: undefined,\n-      loading: true,\n-      error: undefined\n-    });\n+    const { sql } = this.state;\n+    const key = ++this.uniqueKey;  // eslint-disable-line","path":"frontend/src/App.js","position":50,"original_position":50,"commit_id":"b55a986dd66ad8e642f5ccd90a21d277b4c7386f","original_commit_id":"b55a986dd66ad8e642f5ccd90a21d277b4c7386f","user":{"login":"dpordomingo","id":2437584,"avatar_url":"https://avatars2.githubusercontent.com/u/2437584?v=4","gravatar_id":"","url":"https://api.github.com/users/dpordomingo","html_url":"https://github.com/dpordomingo","followers_url":"https://api.github.com/users/dpordomingo/followers","following_url":"https://api.github.com/users/dpordomingo/following{/other_user}","gists_url":"https://api.github.com/users/dpordomingo/gists{/gist_id}","starred_url":"https://api.github.com/users/dpordomingo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dpordomingo/subscriptions","organizations_url":"https://api.github.com/users/dpordomingo/orgs","repos_url":"https://api.github.com/users/dpordomingo/repos","events_url":"https://api.github.com/users/dpordomingo/events{/privacy}","received_events_url":"https://api.github.com/users/dpordomingo/received_events","type":"User","site_admin":false},"body":"I'd avoid exceptions and allow it in `.eslintrc.js`","created_at":"2018-05-18T09:56:56Z","updated_at":"2018-05-18T10:02:10Z","html_url":"https://github.com/src-d/gitbase-playground/pull/27#discussion_r189220176","pull_request_url":"https://api.github.com/repos/src-d/gitbase-playground/pulls/27","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/src-d/gitbase-playground/pulls/comments/189220176"},"html":{"href":"https://github.com/src-d/gitbase-playground/pull/27#discussion_r189220176"},"pull_request":{"href":"https://api.github.com/repos/src-d/gitbase-playground/pulls/27"}}},"pull_request":{"url":"https://api.github.com/repos/src-d/gitbase-playground/pulls/27","id":187266405,"html_url":"https://github.com/src-d/gitbase-playground/pull/27","diff_url":"https://github.com/src-d/gitbase-playground/pull/27.diff","patch_url":"https://github.com/src-d/gitbase-playground/pull/27.patch","issue_url":"https://api.github.com/repos/src-d/gitbase-playground/issues/27","number":27,"state":"open","locked":false,"title":"Frontend: Add tabs","user":{"login":"carlosms","id":1469173,"avatar_url":"https://avatars0.githubusercontent.com/u/1469173?v=4","gravatar_id":"","url":"https://api.github.com/users/carlosms","html_url":"https://github.com/carlosms","followers_url":"https://api.github.com/users/carlosms/followers","following_url":"https://api.github.com/users/carlosms/following{/other_user}","gists_url":"https://api.github.com/users/carlosms/gists{/gist_id}","starred_url":"https://api.github.com/users/carlosms/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/carlosms/subscriptions","organizations_url":"https://api.github.com/users/carlosms/orgs","repos_url":"https://api.github.com/users/carlosms/repos","events_url":"https://api.github.com/users/carlosms/events{/privacy}","received_events_url":"https://api.github.com/users/carlosms/received_events","type":"User","site_admin":false},"body":"Part of #18, also fixes #21.\r\nThe only thing missing from #18 is the split panels resize.\r\n\r\nDepends on #26, the only new commit is d8ca9a3.\r\n\r\n![peek 2018-05-10 20-06](https://user-images.githubusercontent.com/1469173/39886112-c03d4e5a-548e-11e8-87d1-f11001f2dd9d.gif)\r\n\r\n","created_at":"2018-05-10T18:15:38Z","updated_at":"2018-05-18T10:02:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e365d706bd281554ccfcbeb03e6487df57fb6f6c","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/src-d/gitbase-playground/pulls/27/commits","review_comments_url":"https://api.github.com/repos/src-d/gitbase-playground/pulls/27/comments","review_comment_url":"https://api.github.com/repos/src-d/gitbase-playground/pulls/comments{/number}","comments_url":"https://api.github.com/repos/src-d/gitbase-playground/issues/27/comments","statuses_url":"https://api.github.com/repos/src-d/gitbase-playground/statuses/b55a986dd66ad8e642f5ccd90a21d277b4c7386f","head":{"label":"carlosms:issue-18-tabs","ref":"issue-18-tabs","sha":"b55a986dd66ad8e642f5ccd90a21d277b4c7386f","user":{"login":"carlosms","id":1469173,"avatar_url":"https://avatars0.githubusercontent.com/u/1469173?v=4","gravatar_id":"","url":"https://api.github.com/users/carlosms","html_url":"https://github.com/carlosms","followers_url":"https://api.github.com/users/carlosms/followers","following_url":"https://api.github.com/users/carlosms/following{/other_user}","gists_url":"https://api.github.com/users/carlosms/gists{/gist_id}","starred_url":"https://api.github.com/users/carlosms/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/carlosms/subscriptions","organizations_url":"https://api.github.com/users/carlosms/orgs","repos_url":"https://api.github.com/users/carlosms/repos","events_url":"https://api.github.com/users/carlosms/events{/privacy}","received_events_url":"https://api.github.com/users/carlosms/received_events","type":"User","site_admin":false},"repo":{"id":130858699,"name":"gitbase-playground","full_name":"carlosms/gitbase-playground","owner":{"login":"carlosms","id":1469173,"avatar_url":"https://avatars0.githubusercontent.com/u/1469173?v=4","gravatar_id":"","url":"https://api.github.com/users/carlosms","html_url":"https://github.com/carlosms","followers_url":"https://api.github.com/users/carlosms/followers","following_url":"https://api.github.com/users/carlosms/following{/other_user}","gists_url":"https://api.github.com/users/carlosms/gists{/gist_id}","starred_url":"https://api.github.com/users/carlosms/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/carlosms/subscriptions","organizations_url":"https://api.github.com/users/carlosms/orgs","repos_url":"https://api.github.com/users/carlosms/repos","events_url":"https://api.github.com/users/carlosms/events{/privacy}","received_events_url":"https://api.github.com/users/carlosms/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/carlosms/gitbase-playground","description":"gitbase playground","fork":true,"url":"https://api.github.com/repos/carlosms/gitbase-playground","forks_url":"https://api.github.com/repos/carlosms/gitbase-playground/forks","keys_url":"https://api.github.com/repos/carlosms/gitbase-playground/keys{/key_id}","collaborators_url":"https://api.github.com/repos/carlosms/gitbase-playground/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/carlosms/gitbase-playground/teams","hooks_url":"https://api.github.com/repos/carlosms/gitbase-playground/hooks","issue_events_url":"https://api.github.com/repos/carlosms/gitbase-playground/issues/events{/number}","events_url":"https://api.github.com/repos/carlosms/gitbase-playground/events","assignees_url":"https://api.github.com/repos/carlosms/gitbase-playground/assignees{/user}","branches_url":"https://api.github.com/repos/carlosms/gitbase-playground/branches{/branch}","tags_url":"https://api.github.com/repos/carlosms/gitbase-playground/tags","blobs_url":"https://api.github.com/repos/carlosms/gitbase-playground/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/carlosms/gitbase-playground/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/carlosms/gitbase-playground/git/refs{/sha}","trees_url":"https://api.github.com/repos/carlosms/gitbase-playground/git/trees{/sha}","statuses_url":"https://api.github.com/repos/carlosms/gitbase-playground/statuses/{sha}","languages_url":"https://api.github.com/repos/carlosms/gitbase-playground/languages","stargazers_url":"https://api.github.com/repos/carlosms/gitbase-playground/stargazers","contributors_url":"https://api.github.com/repos/carlosms/gitbase-playground/contributors","subscribers_url":"https://api.github.com/repos/carlosms/gitbase-playground/subscribers","subscription_url":"https://api.github.com/repos/carlosms/gitbase-playground/subscription","commits_url":"https://api.github.com/repos/carlosms/gitbase-playground/commits{/sha}","git_commits_url":"https://api.github.com/repos/carlosms/gitbase-playground/git/commits{/sha}","comments_url":"https://api.github.com/repos/carlosms/gitbase-playground/comments{/number}","issue_comment_url":"https://api.github.com/repos/carlosms/gitbase-playground/issues/comments{/number}","contents_url":"https://api.github.com/repos/carlosms/gitbase-playground/contents/{+path}","compare_url":"https://api.github.com/repos/carlosms/gitbase-playground/compare/{base}...{head}","merges_url":"https://api.github.com/repos/carlosms/gitbase-playground/merges","archive_url":"https://api.github.com/repos/carlosms/gitbase-playground/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/carlosms/gitbase-playground/downloads","issues_url":"https://api.github.com/repos/carlosms/gitbase-playground/issues{/number}","pulls_url":"https://api.github.com/repos/carlosms/gitbase-playground/pulls{/number}","milestones_url":"https://api.github.com/repos/carlosms/gitbase-playground/milestones{/number}","notifications_url":"https://api.github.com/repos/carlosms/gitbase-playground/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/carlosms/gitbase-playground/labels{/name}","releases_url":"https://api.github.com/repos/carlosms/gitbase-playground/releases{/id}","deployments_url":"https://api.github.com/repos/carlosms/gitbase-playground/deployments","created_at":"2018-04-24T13:29:19Z","updated_at":"2018-04-24T13:29:21Z","pushed_at":"2018-05-17T17:36:40Z","git_url":"git://github.com/carlosms/gitbase-playground.git","ssh_url":"git@github.com:carlosms/gitbase-playground.git","clone_url":"https://github.com/carlosms/gitbase-playground.git","svn_url":"https://github.com/carlosms/gitbase-playground","homepage":null,"size":1500,"stargazers_count":0,"watchers_count":0,"language":null,"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":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"src-d:master","ref":"master","sha":"daab2343bc5a501a1167ac24d853b7334dd9916b","user":{"login":"src-d","id":15128793,"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":129398671,"name":"gitbase-playground","full_name":"src-d/gitbase-playground","owner":{"login":"src-d","id":15128793,"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},"private":false,"html_url":"https://github.com/src-d/gitbase-playground","description":"gitbase playground","fork":false,"url":"https://api.github.com/repos/src-d/gitbase-playground","forks_url":"https://api.github.com/repos/src-d/gitbase-playground/forks","keys_url":"https://api.github.com/repos/src-d/gitbase-playground/keys{/key_id}","collaborators_url":"https://api.github.com/repos/src-d/gitbase-playground/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/src-d/gitbase-playground/teams","hooks_url":"https://api.github.com/repos/src-d/gitbase-playground/hooks","issue_events_url":"https://api.github.com/repos/src-d/gitbase-playground/issues/events{/number}","events_url":"https://api.github.com/repos/src-d/gitbase-playground/events","assignees_url":"https://api.github.com/repos/src-d/gitbase-playground/assignees{/user}","branches_url":"https://api.github.com/repos/src-d/gitbase-playground/branches{/branch}","tags_url":"https://api.github.com/repos/src-d/gitbase-playground/tags","blobs_url":"https://api.github.com/repos/src-d/gitbase-playground/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/src-d/gitbase-playground/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/src-d/gitbase-playground/git/refs{/sha}","trees_url":"https://api.github.com/repos/src-d/gitbase-playground/git/trees{/sha}","statuses_url":"https://api.github.com/repos/src-d/gitbase-playground/statuses/{sha}","languages_url":"https://api.github.com/repos/src-d/gitbase-playground/languages","stargazers_url":"https://api.github.com/repos/src-d/gitbase-playground/stargazers","contributors_url":"https://api.github.com/repos/src-d/gitbase-playground/contributors","subscribers_url":"https://api.github.com/repos/src-d/gitbase-playground/subscribers","subscription_url":"https://api.github.com/repos/src-d/gitbase-playground/subscription","commits_url":"https://api.github.com/repos/src-d/gitbase-playground/commits{/sha}","git_commits_url":"https://api.github.com/repos/src-d/gitbase-playground/git/commits{/sha}","comments_url":"https://api.github.com/repos/src-d/gitbase-playground/comments{/number}","issue_comment_url":"https://api.github.com/repos/src-d/gitbase-playground/issues/comments{/number}","contents_url":"https://api.github.com/repos/src-d/gitbase-playground/contents/{+path}","compare_url":"https://api.github.com/repos/src-d/gitbase-playground/compare/{base}...{head}","merges_url":"https://api.github.com/repos/src-d/gitbase-playground/merges","archive_url":"https://api.github.com/repos/src-d/gitbase-playground/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/src-d/gitbase-playground/downloads","issues_url":"https://api.github.com/repos/src-d/gitbase-playground/issues{/number}","pulls_url":"https://api.github.com/repos/src-d/gitbase-playground/pulls{/number}","milestones_url":"https://api.github.com/repos/src-d/gitbase-playground/milestones{/number}","notifications_url":"https://api.github.com/repos/src-d/gitbase-playground/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/src-d/gitbase-playground/labels{/name}","releases_url":"https://api.github.com/repos/src-d/gitbase-playground/releases{/id}","deployments_url":"https://api.github.com/repos/src-d/gitbase-playground/deployments","created_at":"2018-04-13T12:22:47Z","updated_at":"2018-05-17T12:58:20Z","pushed_at":"2018-05-17T17:36:41Z","git_url":"git://github.com/src-d/gitbase-playground.git","ssh_url":"git@github.com:src-d/gitbase-playground.git","clone_url":"https://github.com/src-d/gitbase-playground.git","svn_url":"https://github.com/src-d/gitbase-playground","homepage":null,"size":1487,"stargazers_count":2,"watchers_count":2,"language":"Go","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"archived":false,"open_issues_count":17,"license":{"key":"gpl-3.0","name":"GNU General Public License v3.0","spdx_id":"GPL-3.0","url":"https://api.github.com/licenses/gpl-3.0"},"forks":2,"open_issues":17,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/src-d/gitbase-playground/pulls/27"},"html":{"href":"https://github.com/src-d/gitbase-playground/pull/27"},"issue":{"href":"https://api.github.com/repos/src-d/gitbase-playground/issues/27"},"comments":{"href":"https://api.github.com/repos/src-d/gitbase-playground/issues/27/comments"},"review_comments":{"href":"https://api.github.com/repos/src-d/gitbase-playground/pulls/27/comments"},"review_comment":{"href":"https://api.github.com/repos/src-d/gitbase-playground/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/src-d/gitbase-playground/pulls/27/commits"},"statuses":{"href":"https://api.github.com/repos/src-d/gitbase-playground/statuses/b55a986dd66ad8e642f5ccd90a21d277b4c7386f"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"dpordomingo"}}