{"action":"created","comment":{"url":"https://api.github.com/repos/erik-sn/stadium-web/pulls/comments/244533892","pull_request_review_id":188438795,"id":244533892,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI0NDUzMzg5Mg==","diff_hunk":"@@ -0,0 +1,218 @@\n+import React, { Component } from \"react\";\n+import PropTypes from \"prop-types\";\n+import { withStyles } from \"@material-ui/core\";\n+import { compose } from 'redux';\n+import { connect } from \"react-redux\";\n+import { getEnvironments } from \"../../actions/environments\";\n+import DialogTitle from '@material-ui/core/DialogTitle';\n+import Dialog from '@material-ui/core/Dialog';\n+import TextField from '@material-ui/core/TextField';\n+import Button from '@material-ui/core/Button';\n+import api from '../../utils/api';\n+import AddIcon from '@material-ui/icons/Add';\n+import IconButton from '@material-ui/core/IconButton';\n+import Input from '@material-ui/core/Input';\n+import InputLabel from '@material-ui/core/InputLabel';\n+import InputAdornment from '@material-ui/core/InputAdornment';\n+import FormControl from '@material-ui/core/FormControl';\n+import Chip from '@material-ui/core/Chip';\n+import List from '@material-ui/core/List';\n+import Typography from \"@material-ui/core/Typography\";\n+\n+\n+const styles = theme => ({\n+\troot:{\n+\t\tflex: 1,\n+\t},\n+\tcontainer: {\n+\t\tdisplay: 'flex',\n+\t\tflexWrap: 'wrap',\n+\t},\n+\ttextField: {\n+\t\tmargin: theme.spacing.unit*2,\n+\t},\n+\ttagStyle: {\n+\t\tmargin: theme.spacing.unit,\n+\t},\n+})\n+\n+class EnvironmentForm extends Component {\n+  constructor(props) {\n+\t\tsuper(props);\n+\t\tthis.state = {\n+\t\t\tid: this.props.envExists ? this.props.environment.id : this.props.repository.id,\n+\t\t\tname: this.props.envExists ? this.props.environment.name : this.props.repository.name,\n+\t\t\tdescription: this.props.envExists ? this.props.environment.description : this.props.repository.description,\n+\t\t\ttag: '',\n+\t\t\ttags: this.props.envExists && Boolean(this.props.environment.tags) ? this.props.environment.tags : [],\n+\t\t\terror: '',\n+\t\t}\n+    this.getEnvironments = this.getEnvironments.bind(this);\n+  };\n+\n+\n+\tgetEnvironments() {\n+\t\tthis.props.getEnvironments();\n+\t};\n+\n+\thandleClose = () => {\n+    this.props.onClose();\n+\t};\n+\n+\thandleSubmit = (event) => {\n+\t\tevent.preventDefault();\n+\t\tif (this.props.envExists) {\n+\t\t\tapi.editEnvironment(this.state).then(this.handleSuccess).catch(this.handleFailure);\n+\t\t} else {\n+\t\t\tconst { name, description, id, tags} = this.state;\n+\t\t\tapi.createEnvironment(name, description, id, tags).then(this.handleSuccess).catch(this.handleFailure);\n+\t\t}\n+\t}\n+\n+\thandleSuccess = () => {\n+\t\tthis.handleClose();\n+    \tapi.environments().then((json) => {\n+\t  \t\tthis.props.getEnvironments(json.data);\n+\t\t});\n+\t}\n+\t\n+\thandleFailure = () => {\n+\t\tthis.setState({ error: 'Request did NOT succeed!' })\n+\t}\n+\t\n+\n+\thandleChange = name => event => {\n+\t\tthis.setState({","path":"src/components/profile/EnvironmentForm.jsx","position":85,"original_position":85,"commit_id":"60c94ded9637ba6af98096e4aa46fd7aab6521e3","original_commit_id":"60c94ded9637ba6af98096e4aa46fd7aab6521e3","user":{"login":"HendrikPN","id":33830282,"node_id":"MDQ6VXNlcjMzODMwMjgy","avatar_url":"https://avatars0.githubusercontent.com/u/33830282?v=4","gravatar_id":"","url":"https://api.github.com/users/HendrikPN","html_url":"https://github.com/HendrikPN","followers_url":"https://api.github.com/users/HendrikPN/followers","following_url":"https://api.github.com/users/HendrikPN/following{/other_user}","gists_url":"https://api.github.com/users/HendrikPN/gists{/gist_id}","starred_url":"https://api.github.com/users/HendrikPN/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HendrikPN/subscriptions","organizations_url":"https://api.github.com/users/HendrikPN/orgs","repos_url":"https://api.github.com/users/HendrikPN/repos","events_url":"https://api.github.com/users/HendrikPN/events{/privacy}","received_events_url":"https://api.github.com/users/HendrikPN/received_events","type":"User","site_admin":false},"body":"I tried to make that error happen. However, if I write \r\n\r\n```\r\n<TextField\r\n    value={this.state.name}\r\n    onChange={this.handleChange()} \r\n/>\r\n```\r\n\r\ninstead, nothing bad really happens. I can't even make errors work properly...","created_at":"2018-12-30T13:08:28Z","updated_at":"2018-12-30T13:08:28Z","html_url":"https://github.com/erik-sn/stadium-web/pull/5#discussion_r244533892","pull_request_url":"https://api.github.com/repos/erik-sn/stadium-web/pulls/5","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/erik-sn/stadium-web/pulls/comments/244533892"},"html":{"href":"https://github.com/erik-sn/stadium-web/pull/5#discussion_r244533892"},"pull_request":{"href":"https://api.github.com/repos/erik-sn/stadium-web/pulls/5"}},"in_reply_to_id":244250836},"pull_request":{"url":"https://api.github.com/repos/erik-sn/stadium-web/pulls/5","id":241047043,"node_id":"MDExOlB1bGxSZXF1ZXN0MjQxMDQ3MDQz","html_url":"https://github.com/erik-sn/stadium-web/pull/5","diff_url":"https://github.com/erik-sn/stadium-web/pull/5.diff","patch_url":"https://github.com/erik-sn/stadium-web/pull/5.patch","issue_url":"https://api.github.com/repos/erik-sn/stadium-web/issues/5","number":5,"state":"open","locked":false,"title":"Feature/env model","user":{"login":"HendrikPN","id":33830282,"node_id":"MDQ6VXNlcjMzODMwMjgy","avatar_url":"https://avatars0.githubusercontent.com/u/33830282?v=4","gravatar_id":"","url":"https://api.github.com/users/HendrikPN","html_url":"https://github.com/HendrikPN","followers_url":"https://api.github.com/users/HendrikPN/followers","following_url":"https://api.github.com/users/HendrikPN/following{/other_user}","gists_url":"https://api.github.com/users/HendrikPN/gists{/gist_id}","starred_url":"https://api.github.com/users/HendrikPN/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HendrikPN/subscriptions","organizations_url":"https://api.github.com/users/HendrikPN/orgs","repos_url":"https://api.github.com/users/HendrikPN/repos","events_url":"https://api.github.com/users/HendrikPN/events{/privacy}","received_events_url":"https://api.github.com/users/HendrikPN/received_events","type":"User","site_admin":false},"body":"Distinguishes repositories and environments at the frontend. Also included are some additional features in general, including styling. \r\nThe code itself might have some style issues. Maybe I could have done a better job at separating components. Should be double checked...","created_at":"2018-12-26T23:02:23Z","updated_at":"2018-12-30T13:08:28Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e1ccf3cf15f2e14a808b4f57e11e224ff780309e","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/erik-sn/stadium-web/pulls/5/commits","review_comments_url":"https://api.github.com/repos/erik-sn/stadium-web/pulls/5/comments","review_comment_url":"https://api.github.com/repos/erik-sn/stadium-web/pulls/comments{/number}","comments_url":"https://api.github.com/repos/erik-sn/stadium-web/issues/5/comments","statuses_url":"https://api.github.com/repos/erik-sn/stadium-web/statuses/60c94ded9637ba6af98096e4aa46fd7aab6521e3","head":{"label":"HendrikPN:feature/env_model","ref":"feature/env_model","sha":"60c94ded9637ba6af98096e4aa46fd7aab6521e3","user":{"login":"HendrikPN","id":33830282,"node_id":"MDQ6VXNlcjMzODMwMjgy","avatar_url":"https://avatars0.githubusercontent.com/u/33830282?v=4","gravatar_id":"","url":"https://api.github.com/users/HendrikPN","html_url":"https://github.com/HendrikPN","followers_url":"https://api.github.com/users/HendrikPN/followers","following_url":"https://api.github.com/users/HendrikPN/following{/other_user}","gists_url":"https://api.github.com/users/HendrikPN/gists{/gist_id}","starred_url":"https://api.github.com/users/HendrikPN/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HendrikPN/subscriptions","organizations_url":"https://api.github.com/users/HendrikPN/orgs","repos_url":"https://api.github.com/users/HendrikPN/repos","events_url":"https://api.github.com/users/HendrikPN/events{/privacy}","received_events_url":"https://api.github.com/users/HendrikPN/received_events","type":"User","site_admin":false},"repo":{"id":160220824,"node_id":"MDEwOlJlcG9zaXRvcnkxNjAyMjA4MjQ=","name":"stadium-web","full_name":"HendrikPN/stadium-web","private":false,"owner":{"login":"HendrikPN","id":33830282,"node_id":"MDQ6VXNlcjMzODMwMjgy","avatar_url":"https://avatars0.githubusercontent.com/u/33830282?v=4","gravatar_id":"","url":"https://api.github.com/users/HendrikPN","html_url":"https://github.com/HendrikPN","followers_url":"https://api.github.com/users/HendrikPN/followers","following_url":"https://api.github.com/users/HendrikPN/following{/other_user}","gists_url":"https://api.github.com/users/HendrikPN/gists{/gist_id}","starred_url":"https://api.github.com/users/HendrikPN/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HendrikPN/subscriptions","organizations_url":"https://api.github.com/users/HendrikPN/orgs","repos_url":"https://api.github.com/users/HendrikPN/repos","events_url":"https://api.github.com/users/HendrikPN/events{/privacy}","received_events_url":"https://api.github.com/users/HendrikPN/received_events","type":"User","site_admin":false},"html_url":"https://github.com/HendrikPN/stadium-web","description":null,"fork":true,"url":"https://api.github.com/repos/HendrikPN/stadium-web","forks_url":"https://api.github.com/repos/HendrikPN/stadium-web/forks","keys_url":"https://api.github.com/repos/HendrikPN/stadium-web/keys{/key_id}","collaborators_url":"https://api.github.com/repos/HendrikPN/stadium-web/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/HendrikPN/stadium-web/teams","hooks_url":"https://api.github.com/repos/HendrikPN/stadium-web/hooks","issue_events_url":"https://api.github.com/repos/HendrikPN/stadium-web/issues/events{/number}","events_url":"https://api.github.com/repos/HendrikPN/stadium-web/events","assignees_url":"https://api.github.com/repos/HendrikPN/stadium-web/assignees{/user}","branches_url":"https://api.github.com/repos/HendrikPN/stadium-web/branches{/branch}","tags_url":"https://api.github.com/repos/HendrikPN/stadium-web/tags","blobs_url":"https://api.github.com/repos/HendrikPN/stadium-web/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/HendrikPN/stadium-web/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/HendrikPN/stadium-web/git/refs{/sha}","trees_url":"https://api.github.com/repos/HendrikPN/stadium-web/git/trees{/sha}","statuses_url":"https://api.github.com/repos/HendrikPN/stadium-web/statuses/{sha}","languages_url":"https://api.github.com/repos/HendrikPN/stadium-web/languages","stargazers_url":"https://api.github.com/repos/HendrikPN/stadium-web/stargazers","contributors_url":"https://api.github.com/repos/HendrikPN/stadium-web/contributors","subscribers_url":"https://api.github.com/repos/HendrikPN/stadium-web/subscribers","subscription_url":"https://api.github.com/repos/HendrikPN/stadium-web/subscription","commits_url":"https://api.github.com/repos/HendrikPN/stadium-web/commits{/sha}","git_commits_url":"https://api.github.com/repos/HendrikPN/stadium-web/git/commits{/sha}","comments_url":"https://api.github.com/repos/HendrikPN/stadium-web/comments{/number}","issue_comment_url":"https://api.github.com/repos/HendrikPN/stadium-web/issues/comments{/number}","contents_url":"https://api.github.com/repos/HendrikPN/stadium-web/contents/{+path}","compare_url":"https://api.github.com/repos/HendrikPN/stadium-web/compare/{base}...{head}","merges_url":"https://api.github.com/repos/HendrikPN/stadium-web/merges","archive_url":"https://api.github.com/repos/HendrikPN/stadium-web/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/HendrikPN/stadium-web/downloads","issues_url":"https://api.github.com/repos/HendrikPN/stadium-web/issues{/number}","pulls_url":"https://api.github.com/repos/HendrikPN/stadium-web/pulls{/number}","milestones_url":"https://api.github.com/repos/HendrikPN/stadium-web/milestones{/number}","notifications_url":"https://api.github.com/repos/HendrikPN/stadium-web/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/HendrikPN/stadium-web/labels{/name}","releases_url":"https://api.github.com/repos/HendrikPN/stadium-web/releases{/id}","deployments_url":"https://api.github.com/repos/HendrikPN/stadium-web/deployments","created_at":"2018-12-03T16:27:23Z","updated_at":"2018-12-23T19:20:10Z","pushed_at":"2018-12-26T22:53:24Z","git_url":"git://github.com/HendrikPN/stadium-web.git","ssh_url":"git@github.com:HendrikPN/stadium-web.git","clone_url":"https://github.com/HendrikPN/stadium-web.git","svn_url":"https://github.com/HendrikPN/stadium-web","homepage":null,"size":651,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","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":"erik-sn:master","ref":"master","sha":"c49d11861ecc34ec20eae0e490d15ecb28bf4b1b","user":{"login":"erik-sn","id":17732472,"node_id":"MDQ6VXNlcjE3NzMyNDcy","avatar_url":"https://avatars2.githubusercontent.com/u/17732472?v=4","gravatar_id":"","url":"https://api.github.com/users/erik-sn","html_url":"https://github.com/erik-sn","followers_url":"https://api.github.com/users/erik-sn/followers","following_url":"https://api.github.com/users/erik-sn/following{/other_user}","gists_url":"https://api.github.com/users/erik-sn/gists{/gist_id}","starred_url":"https://api.github.com/users/erik-sn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/erik-sn/subscriptions","organizations_url":"https://api.github.com/users/erik-sn/orgs","repos_url":"https://api.github.com/users/erik-sn/repos","events_url":"https://api.github.com/users/erik-sn/events{/privacy}","received_events_url":"https://api.github.com/users/erik-sn/received_events","type":"User","site_admin":false},"repo":{"id":158880752,"node_id":"MDEwOlJlcG9zaXRvcnkxNTg4ODA3NTI=","name":"stadium-web","full_name":"erik-sn/stadium-web","private":false,"owner":{"login":"erik-sn","id":17732472,"node_id":"MDQ6VXNlcjE3NzMyNDcy","avatar_url":"https://avatars2.githubusercontent.com/u/17732472?v=4","gravatar_id":"","url":"https://api.github.com/users/erik-sn","html_url":"https://github.com/erik-sn","followers_url":"https://api.github.com/users/erik-sn/followers","following_url":"https://api.github.com/users/erik-sn/following{/other_user}","gists_url":"https://api.github.com/users/erik-sn/gists{/gist_id}","starred_url":"https://api.github.com/users/erik-sn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/erik-sn/subscriptions","organizations_url":"https://api.github.com/users/erik-sn/orgs","repos_url":"https://api.github.com/users/erik-sn/repos","events_url":"https://api.github.com/users/erik-sn/events{/privacy}","received_events_url":"https://api.github.com/users/erik-sn/received_events","type":"User","site_admin":false},"html_url":"https://github.com/erik-sn/stadium-web","description":null,"fork":false,"url":"https://api.github.com/repos/erik-sn/stadium-web","forks_url":"https://api.github.com/repos/erik-sn/stadium-web/forks","keys_url":"https://api.github.com/repos/erik-sn/stadium-web/keys{/key_id}","collaborators_url":"https://api.github.com/repos/erik-sn/stadium-web/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/erik-sn/stadium-web/teams","hooks_url":"https://api.github.com/repos/erik-sn/stadium-web/hooks","issue_events_url":"https://api.github.com/repos/erik-sn/stadium-web/issues/events{/number}","events_url":"https://api.github.com/repos/erik-sn/stadium-web/events","assignees_url":"https://api.github.com/repos/erik-sn/stadium-web/assignees{/user}","branches_url":"https://api.github.com/repos/erik-sn/stadium-web/branches{/branch}","tags_url":"https://api.github.com/repos/erik-sn/stadium-web/tags","blobs_url":"https://api.github.com/repos/erik-sn/stadium-web/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/erik-sn/stadium-web/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/erik-sn/stadium-web/git/refs{/sha}","trees_url":"https://api.github.com/repos/erik-sn/stadium-web/git/trees{/sha}","statuses_url":"https://api.github.com/repos/erik-sn/stadium-web/statuses/{sha}","languages_url":"https://api.github.com/repos/erik-sn/stadium-web/languages","stargazers_url":"https://api.github.com/repos/erik-sn/stadium-web/stargazers","contributors_url":"https://api.github.com/repos/erik-sn/stadium-web/contributors","subscribers_url":"https://api.github.com/repos/erik-sn/stadium-web/subscribers","subscription_url":"https://api.github.com/repos/erik-sn/stadium-web/subscription","commits_url":"https://api.github.com/repos/erik-sn/stadium-web/commits{/sha}","git_commits_url":"https://api.github.com/repos/erik-sn/stadium-web/git/commits{/sha}","comments_url":"https://api.github.com/repos/erik-sn/stadium-web/comments{/number}","issue_comment_url":"https://api.github.com/repos/erik-sn/stadium-web/issues/comments{/number}","contents_url":"https://api.github.com/repos/erik-sn/stadium-web/contents/{+path}","compare_url":"https://api.github.com/repos/erik-sn/stadium-web/compare/{base}...{head}","merges_url":"https://api.github.com/repos/erik-sn/stadium-web/merges","archive_url":"https://api.github.com/repos/erik-sn/stadium-web/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/erik-sn/stadium-web/downloads","issues_url":"https://api.github.com/repos/erik-sn/stadium-web/issues{/number}","pulls_url":"https://api.github.com/repos/erik-sn/stadium-web/pulls{/number}","milestones_url":"https://api.github.com/repos/erik-sn/stadium-web/milestones{/number}","notifications_url":"https://api.github.com/repos/erik-sn/stadium-web/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/erik-sn/stadium-web/labels{/name}","releases_url":"https://api.github.com/repos/erik-sn/stadium-web/releases{/id}","deployments_url":"https://api.github.com/repos/erik-sn/stadium-web/deployments","created_at":"2018-11-23T21:49:03Z","updated_at":"2018-12-10T15:47:22Z","pushed_at":"2018-12-26T23:02:24Z","git_url":"git://github.com/erik-sn/stadium-web.git","ssh_url":"git@github.com:erik-sn/stadium-web.git","clone_url":"https://github.com/erik-sn/stadium-web.git","svn_url":"https://github.com/erik-sn/stadium-web","homepage":null,"size":478,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":2,"license":null,"forks":1,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/erik-sn/stadium-web/pulls/5"},"html":{"href":"https://github.com/erik-sn/stadium-web/pull/5"},"issue":{"href":"https://api.github.com/repos/erik-sn/stadium-web/issues/5"},"comments":{"href":"https://api.github.com/repos/erik-sn/stadium-web/issues/5/comments"},"review_comments":{"href":"https://api.github.com/repos/erik-sn/stadium-web/pulls/5/comments"},"review_comment":{"href":"https://api.github.com/repos/erik-sn/stadium-web/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/erik-sn/stadium-web/pulls/5/commits"},"statuses":{"href":"https://api.github.com/repos/erik-sn/stadium-web/statuses/60c94ded9637ba6af98096e4aa46fd7aab6521e3"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"HendrikPN"}}