{"action":"created","comment":{"url":"https://api.github.com/repos/datadotworld/excel-add-in/pulls/comments/168502779","pull_request_review_id":96879819,"id":168502779,"diff_hunk":"@@ -0,0 +1,147 @@\n+/*\n+ * Copyright 2018 data.world, Inc.\n+ *\n+ * Licensed under the Apache License, Version 2.0 (the \"License\");\n+ * you may not use this file except in compliance with the License.\n+ * You may obtain a copy of the License at\n+ *\n+ *     http://www.apache.org/licenses/LICENSE-2.0\n+ *\n+ * Unless required by applicable law or agreed to in writing, software\n+ * distributed under the License is distributed on an \"AS IS\" BASIS,\n+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+ * See the License for the specific language governing permissions and\n+ * limitations under the License.\n+ *\n+ * This product includes software developed at\n+ * data.world, Inc. (http://data.world/).\n+ */\n+import React, { Component } from 'react';\n+import { \n+  Button,\n+  ControlLabel,\n+  FormControl,\n+  FormGroup,\n+  InputGroup,\n+  Row,\n+  DropdownButton,\n+  MenuItem\n+} from 'react-bootstrap';\n+import Published from './Published';\n+\n+import './UploadInsight.css';\n+\n+\n+class UploadInsight extends Component {\n+  constructor(props) {\n+    super();\n+\n+    const defaultProject = props.projects[0];\n+    this.state = {\n+      title: props.title || '',\n+      project: defaultProject,\n+      description: '',\n+      uploadComplete: false,\n+      uri: ''\n+    };\n+  }\n+\n+  handleChange = (e) => {\n+    const { name, value } = e.target;\n+\n+    this.setState({ [name]: value});\n+  }\n+\n+  onSelect = (eventKey) => {\n+    const projects = this.props.projects;\n+    const selected = {\n+      owner: projects[eventKey].owner,\n+      id: projects[eventKey].id\n+    };\n+\n+    this.setState({ project: selected });\n+  }\n+\n+  upload = () => {\n+    const { chart } = this.props;\n+    const { title, project, description } = this.state;\n+    this.props.uploadChart(chart, { title, project, description }).then(res => {\n+      this.setState({ uploadComplete: true, uri: res })\n+    });\n+  }\n+\n+  close = () => {\n+    window.location.pathname = '/insights';","path":"src/components/UploadInsight.js","position":76,"original_position":74,"commit_id":"ffb164f06d2881dbed0820baf9b895c715fd9857","original_commit_id":"1b2ae09cf24654685a561d5453aa014a75714e81","user":{"login":"alevicki","id":1616066,"avatar_url":"https://avatars1.githubusercontent.com/u/1616066?v=4","gravatar_id":"","url":"https://api.github.com/users/alevicki","html_url":"https://github.com/alevicki","followers_url":"https://api.github.com/users/alevicki/followers","following_url":"https://api.github.com/users/alevicki/following{/other_user}","gists_url":"https://api.github.com/users/alevicki/gists{/gist_id}","starred_url":"https://api.github.com/users/alevicki/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alevicki/subscriptions","organizations_url":"https://api.github.com/users/alevicki/orgs","repos_url":"https://api.github.com/users/alevicki/repos","events_url":"https://api.github.com/users/alevicki/events{/privacy}","received_events_url":"https://api.github.com/users/alevicki/received_events","type":"User","site_admin":false},"body":"Why is it necessary if it doesn't cause a re-render?","created_at":"2018-02-15T15:07:13Z","updated_at":"2018-02-15T15:07:14Z","html_url":"https://github.com/datadotworld/excel-add-in/pull/62#discussion_r168502779","pull_request_url":"https://api.github.com/repos/datadotworld/excel-add-in/pulls/62","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/datadotworld/excel-add-in/pulls/comments/168502779"},"html":{"href":"https://github.com/datadotworld/excel-add-in/pull/62#discussion_r168502779"},"pull_request":{"href":"https://api.github.com/repos/datadotworld/excel-add-in/pulls/62"}},"in_reply_to_id":167915109},"pull_request":{"url":"https://api.github.com/repos/datadotworld/excel-add-in/pulls/62","id":168867887,"html_url":"https://github.com/datadotworld/excel-add-in/pull/62","diff_url":"https://github.com/datadotworld/excel-add-in/pull/62.diff","patch_url":"https://github.com/datadotworld/excel-add-in/pull/62.patch","issue_url":"https://api.github.com/repos/datadotworld/excel-add-in/issues/62","number":62,"state":"open","locked":false,"title":"Upload charts to data.world as insights","user":{"login":"kndungu","id":17295379,"avatar_url":"https://avatars2.githubusercontent.com/u/17295379?v=4","gravatar_id":"","url":"https://api.github.com/users/kndungu","html_url":"https://github.com/kndungu","followers_url":"https://api.github.com/users/kndungu/followers","following_url":"https://api.github.com/users/kndungu/following{/other_user}","gists_url":"https://api.github.com/users/kndungu/gists{/gist_id}","starred_url":"https://api.github.com/users/kndungu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kndungu/subscriptions","organizations_url":"https://api.github.com/users/kndungu/orgs","repos_url":"https://api.github.com/users/kndungu/repos","events_url":"https://api.github.com/users/kndungu/events{/privacy}","received_events_url":"https://api.github.com/users/kndungu/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-02-13T15:02:24Z","updated_at":"2018-02-15T15:07:14Z","closed_at":null,"merged_at":null,"merge_commit_sha":"834dfdddc0b84198b56e60df51f3e13e21a603c6","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/datadotworld/excel-add-in/pulls/62/commits","review_comments_url":"https://api.github.com/repos/datadotworld/excel-add-in/pulls/62/comments","review_comment_url":"https://api.github.com/repos/datadotworld/excel-add-in/pulls/comments{/number}","comments_url":"https://api.github.com/repos/datadotworld/excel-add-in/issues/62/comments","statuses_url":"https://api.github.com/repos/datadotworld/excel-add-in/statuses/ffb164f06d2881dbed0820baf9b895c715fd9857","head":{"label":"datadotworld:upload-insight","ref":"upload-insight","sha":"ffb164f06d2881dbed0820baf9b895c715fd9857","user":{"login":"datadotworld","id":14143948,"avatar_url":"https://avatars0.githubusercontent.com/u/14143948?v=4","gravatar_id":"","url":"https://api.github.com/users/datadotworld","html_url":"https://github.com/datadotworld","followers_url":"https://api.github.com/users/datadotworld/followers","following_url":"https://api.github.com/users/datadotworld/following{/other_user}","gists_url":"https://api.github.com/users/datadotworld/gists{/gist_id}","starred_url":"https://api.github.com/users/datadotworld/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/datadotworld/subscriptions","organizations_url":"https://api.github.com/users/datadotworld/orgs","repos_url":"https://api.github.com/users/datadotworld/repos","events_url":"https://api.github.com/users/datadotworld/events{/privacy}","received_events_url":"https://api.github.com/users/datadotworld/received_events","type":"Organization","site_admin":false},"repo":{"id":98214848,"name":"excel-add-in","full_name":"datadotworld/excel-add-in","owner":{"login":"datadotworld","id":14143948,"avatar_url":"https://avatars0.githubusercontent.com/u/14143948?v=4","gravatar_id":"","url":"https://api.github.com/users/datadotworld","html_url":"https://github.com/datadotworld","followers_url":"https://api.github.com/users/datadotworld/followers","following_url":"https://api.github.com/users/datadotworld/following{/other_user}","gists_url":"https://api.github.com/users/datadotworld/gists{/gist_id}","starred_url":"https://api.github.com/users/datadotworld/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/datadotworld/subscriptions","organizations_url":"https://api.github.com/users/datadotworld/orgs","repos_url":"https://api.github.com/users/datadotworld/repos","events_url":"https://api.github.com/users/datadotworld/events{/privacy}","received_events_url":"https://api.github.com/users/datadotworld/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/datadotworld/excel-add-in","description":"Excel add-in for data.world","fork":false,"url":"https://api.github.com/repos/datadotworld/excel-add-in","forks_url":"https://api.github.com/repos/datadotworld/excel-add-in/forks","keys_url":"https://api.github.com/repos/datadotworld/excel-add-in/keys{/key_id}","collaborators_url":"https://api.github.com/repos/datadotworld/excel-add-in/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/datadotworld/excel-add-in/teams","hooks_url":"https://api.github.com/repos/datadotworld/excel-add-in/hooks","issue_events_url":"https://api.github.com/repos/datadotworld/excel-add-in/issues/events{/number}","events_url":"https://api.github.com/repos/datadotworld/excel-add-in/events","assignees_url":"https://api.github.com/repos/datadotworld/excel-add-in/assignees{/user}","branches_url":"https://api.github.com/repos/datadotworld/excel-add-in/branches{/branch}","tags_url":"https://api.github.com/repos/datadotworld/excel-add-in/tags","blobs_url":"https://api.github.com/repos/datadotworld/excel-add-in/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/datadotworld/excel-add-in/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/datadotworld/excel-add-in/git/refs{/sha}","trees_url":"https://api.github.com/repos/datadotworld/excel-add-in/git/trees{/sha}","statuses_url":"https://api.github.com/repos/datadotworld/excel-add-in/statuses/{sha}","languages_url":"https://api.github.com/repos/datadotworld/excel-add-in/languages","stargazers_url":"https://api.github.com/repos/datadotworld/excel-add-in/stargazers","contributors_url":"https://api.github.com/repos/datadotworld/excel-add-in/contributors","subscribers_url":"https://api.github.com/repos/datadotworld/excel-add-in/subscribers","subscription_url":"https://api.github.com/repos/datadotworld/excel-add-in/subscription","commits_url":"https://api.github.com/repos/datadotworld/excel-add-in/commits{/sha}","git_commits_url":"https://api.github.com/repos/datadotworld/excel-add-in/git/commits{/sha}","comments_url":"https://api.github.com/repos/datadotworld/excel-add-in/comments{/number}","issue_comment_url":"https://api.github.com/repos/datadotworld/excel-add-in/issues/comments{/number}","contents_url":"https://api.github.com/repos/datadotworld/excel-add-in/contents/{+path}","compare_url":"https://api.github.com/repos/datadotworld/excel-add-in/compare/{base}...{head}","merges_url":"https://api.github.com/repos/datadotworld/excel-add-in/merges","archive_url":"https://api.github.com/repos/datadotworld/excel-add-in/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/datadotworld/excel-add-in/downloads","issues_url":"https://api.github.com/repos/datadotworld/excel-add-in/issues{/number}","pulls_url":"https://api.github.com/repos/datadotworld/excel-add-in/pulls{/number}","milestones_url":"https://api.github.com/repos/datadotworld/excel-add-in/milestones{/number}","notifications_url":"https://api.github.com/repos/datadotworld/excel-add-in/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/datadotworld/excel-add-in/labels{/name}","releases_url":"https://api.github.com/repos/datadotworld/excel-add-in/releases{/id}","deployments_url":"https://api.github.com/repos/datadotworld/excel-add-in/deployments","created_at":"2017-07-24T17:08:14Z","updated_at":"2017-12-27T22:41:45Z","pushed_at":"2018-02-15T12:59:48Z","git_url":"git://github.com/datadotworld/excel-add-in.git","ssh_url":"git@github.com:datadotworld/excel-add-in.git","clone_url":"https://github.com/datadotworld/excel-add-in.git","svn_url":"https://github.com/datadotworld/excel-add-in","homepage":"https://data.world/integrations/excel","size":662,"stargazers_count":4,"watchers_count":4,"language":"JavaScript","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":2,"mirror_url":null,"archived":false,"open_issues_count":12,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":2,"open_issues":12,"watchers":4,"default_branch":"master"}},"base":{"label":"datadotworld:master","ref":"master","sha":"4efab7ce7de3f04ad6f77c2139dd28bbef2538cd","user":{"login":"datadotworld","id":14143948,"avatar_url":"https://avatars0.githubusercontent.com/u/14143948?v=4","gravatar_id":"","url":"https://api.github.com/users/datadotworld","html_url":"https://github.com/datadotworld","followers_url":"https://api.github.com/users/datadotworld/followers","following_url":"https://api.github.com/users/datadotworld/following{/other_user}","gists_url":"https://api.github.com/users/datadotworld/gists{/gist_id}","starred_url":"https://api.github.com/users/datadotworld/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/datadotworld/subscriptions","organizations_url":"https://api.github.com/users/datadotworld/orgs","repos_url":"https://api.github.com/users/datadotworld/repos","events_url":"https://api.github.com/users/datadotworld/events{/privacy}","received_events_url":"https://api.github.com/users/datadotworld/received_events","type":"Organization","site_admin":false},"repo":{"id":98214848,"name":"excel-add-in","full_name":"datadotworld/excel-add-in","owner":{"login":"datadotworld","id":14143948,"avatar_url":"https://avatars0.githubusercontent.com/u/14143948?v=4","gravatar_id":"","url":"https://api.github.com/users/datadotworld","html_url":"https://github.com/datadotworld","followers_url":"https://api.github.com/users/datadotworld/followers","following_url":"https://api.github.com/users/datadotworld/following{/other_user}","gists_url":"https://api.github.com/users/datadotworld/gists{/gist_id}","starred_url":"https://api.github.com/users/datadotworld/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/datadotworld/subscriptions","organizations_url":"https://api.github.com/users/datadotworld/orgs","repos_url":"https://api.github.com/users/datadotworld/repos","events_url":"https://api.github.com/users/datadotworld/events{/privacy}","received_events_url":"https://api.github.com/users/datadotworld/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/datadotworld/excel-add-in","description":"Excel add-in for data.world","fork":false,"url":"https://api.github.com/repos/datadotworld/excel-add-in","forks_url":"https://api.github.com/repos/datadotworld/excel-add-in/forks","keys_url":"https://api.github.com/repos/datadotworld/excel-add-in/keys{/key_id}","collaborators_url":"https://api.github.com/repos/datadotworld/excel-add-in/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/datadotworld/excel-add-in/teams","hooks_url":"https://api.github.com/repos/datadotworld/excel-add-in/hooks","issue_events_url":"https://api.github.com/repos/datadotworld/excel-add-in/issues/events{/number}","events_url":"https://api.github.com/repos/datadotworld/excel-add-in/events","assignees_url":"https://api.github.com/repos/datadotworld/excel-add-in/assignees{/user}","branches_url":"https://api.github.com/repos/datadotworld/excel-add-in/branches{/branch}","tags_url":"https://api.github.com/repos/datadotworld/excel-add-in/tags","blobs_url":"https://api.github.com/repos/datadotworld/excel-add-in/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/datadotworld/excel-add-in/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/datadotworld/excel-add-in/git/refs{/sha}","trees_url":"https://api.github.com/repos/datadotworld/excel-add-in/git/trees{/sha}","statuses_url":"https://api.github.com/repos/datadotworld/excel-add-in/statuses/{sha}","languages_url":"https://api.github.com/repos/datadotworld/excel-add-in/languages","stargazers_url":"https://api.github.com/repos/datadotworld/excel-add-in/stargazers","contributors_url":"https://api.github.com/repos/datadotworld/excel-add-in/contributors","subscribers_url":"https://api.github.com/repos/datadotworld/excel-add-in/subscribers","subscription_url":"https://api.github.com/repos/datadotworld/excel-add-in/subscription","commits_url":"https://api.github.com/repos/datadotworld/excel-add-in/commits{/sha}","git_commits_url":"https://api.github.com/repos/datadotworld/excel-add-in/git/commits{/sha}","comments_url":"https://api.github.com/repos/datadotworld/excel-add-in/comments{/number}","issue_comment_url":"https://api.github.com/repos/datadotworld/excel-add-in/issues/comments{/number}","contents_url":"https://api.github.com/repos/datadotworld/excel-add-in/contents/{+path}","compare_url":"https://api.github.com/repos/datadotworld/excel-add-in/compare/{base}...{head}","merges_url":"https://api.github.com/repos/datadotworld/excel-add-in/merges","archive_url":"https://api.github.com/repos/datadotworld/excel-add-in/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/datadotworld/excel-add-in/downloads","issues_url":"https://api.github.com/repos/datadotworld/excel-add-in/issues{/number}","pulls_url":"https://api.github.com/repos/datadotworld/excel-add-in/pulls{/number}","milestones_url":"https://api.github.com/repos/datadotworld/excel-add-in/milestones{/number}","notifications_url":"https://api.github.com/repos/datadotworld/excel-add-in/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/datadotworld/excel-add-in/labels{/name}","releases_url":"https://api.github.com/repos/datadotworld/excel-add-in/releases{/id}","deployments_url":"https://api.github.com/repos/datadotworld/excel-add-in/deployments","created_at":"2017-07-24T17:08:14Z","updated_at":"2017-12-27T22:41:45Z","pushed_at":"2018-02-15T12:59:48Z","git_url":"git://github.com/datadotworld/excel-add-in.git","ssh_url":"git@github.com:datadotworld/excel-add-in.git","clone_url":"https://github.com/datadotworld/excel-add-in.git","svn_url":"https://github.com/datadotworld/excel-add-in","homepage":"https://data.world/integrations/excel","size":662,"stargazers_count":4,"watchers_count":4,"language":"JavaScript","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":2,"mirror_url":null,"archived":false,"open_issues_count":12,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":2,"open_issues":12,"watchers":4,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/datadotworld/excel-add-in/pulls/62"},"html":{"href":"https://github.com/datadotworld/excel-add-in/pull/62"},"issue":{"href":"https://api.github.com/repos/datadotworld/excel-add-in/issues/62"},"comments":{"href":"https://api.github.com/repos/datadotworld/excel-add-in/issues/62/comments"},"review_comments":{"href":"https://api.github.com/repos/datadotworld/excel-add-in/pulls/62/comments"},"review_comment":{"href":"https://api.github.com/repos/datadotworld/excel-add-in/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/datadotworld/excel-add-in/pulls/62/commits"},"statuses":{"href":"https://api.github.com/repos/datadotworld/excel-add-in/statuses/ffb164f06d2881dbed0820baf9b895c715fd9857"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"alevicki"}}