{"action":"created","comment":{"url":"https://api.github.com/repos/Kommunity-app/kommunity-frontend/pulls/comments/239708718","pull_request_review_id":182567446,"id":239708718,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzOTcwODcxOA==","diff_hunk":"@@ -0,0 +1,63 @@\n+import React from 'react';\n+import PropTypes from 'prop-types';\n+import cls from 'classnames';\n+\n+const styles = {\n+  horizontal: 'flex',\n+  vertical: 'flex flex-col items-start',\n+};\n+class RadioButtonGroup extends React.Component {\n+  constructor(props) {\n+    super(props);\n+    this.state = {\n+      selectedId: undefined,\n+    };\n+  }\n+\n+  componentDidMount() {\n+    React.Children.map(this.props.children, (child, index) => {\n+      if (!this.state.selectedId && child.props.defaultChecked) {\n+        this.setState({ selectedId: index + this.props.name });\n+      }\n+    });\n+  }\n+\n+  onChange = (itemOnChage) => {\n+    return (id, val, checked) => {\n+      if (id !== this.state.selectedId && checked) this.setState({ selectedId: id });\n+      if (this.props.onChange) this.props.onChange(val, checked);\n+      else if (itemOnChage) itemOnChage(val, checked);\n+    };\n+  };\n+\n+  render() {\n+    const {\n+      size, extraClassName, orientation, children, name,\n+    } = this.props;\n+    const newRadioButtons = React.Children.map(children, (child, index) => {\n+      return React.cloneElement(child, {\n+        extraClassName: { 'w-full': orientation === 'vertical' },\n+        id: index + name,\n+        name,\n+        onChange: this.onChange(child.props.onChange),\n+        selectedId: this.state.selectedId,\n+        size,\n+      });\n+    });\n+\n+    return <div className={cls(extraClassName, styles[orientation])}>{newRadioButtons}</div>;\n+  }\n+}\n+RadioButtonGroup.defaultProps = {\n+  orientation: 'vertical',\n+};\n+RadioButtonGroup.propTypes = {\n+  children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node]).isRequired,\n+  extraClassName: PropTypes.string,\n+  name: PropTypes.string.isRequired,","path":"src/components/ui/radio-button-group.js","position":57,"original_position":57,"commit_id":"d13b6dc2be696dbaecd85a9dc482daee4622f1f4","original_commit_id":"d13b6dc2be696dbaecd85a9dc482daee4622f1f4","user":{"login":"SelmanKahya","id":3432700,"node_id":"MDQ6VXNlcjM0MzI3MDA=","avatar_url":"https://avatars2.githubusercontent.com/u/3432700?v=4","gravatar_id":"","url":"https://api.github.com/users/SelmanKahya","html_url":"https://github.com/SelmanKahya","followers_url":"https://api.github.com/users/SelmanKahya/followers","following_url":"https://api.github.com/users/SelmanKahya/following{/other_user}","gists_url":"https://api.github.com/users/SelmanKahya/gists{/gist_id}","starred_url":"https://api.github.com/users/SelmanKahya/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SelmanKahya/subscriptions","organizations_url":"https://api.github.com/users/SelmanKahya/orgs","repos_url":"https://api.github.com/users/SelmanKahya/repos","events_url":"https://api.github.com/users/SelmanKahya/events{/privacy}","received_events_url":"https://api.github.com/users/SelmanKahya/received_events","type":"User","site_admin":false},"body":"grup icin name'e gerek var mi? butonlara var, fakat group'a yok sanki","created_at":"2018-12-07T06:50:21Z","updated_at":"2018-12-07T06:50:22Z","html_url":"https://github.com/Kommunity-app/kommunity-frontend/pull/99#discussion_r239708718","pull_request_url":"https://api.github.com/repos/Kommunity-app/kommunity-frontend/pulls/99","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/Kommunity-app/kommunity-frontend/pulls/comments/239708718"},"html":{"href":"https://github.com/Kommunity-app/kommunity-frontend/pull/99#discussion_r239708718"},"pull_request":{"href":"https://api.github.com/repos/Kommunity-app/kommunity-frontend/pulls/99"}},"in_reply_to_id":239436740},"pull_request":{"url":"https://api.github.com/repos/Kommunity-app/kommunity-frontend/pulls/99","id":233394205,"node_id":"MDExOlB1bGxSZXF1ZXN0MjMzMzk0MjA1","html_url":"https://github.com/Kommunity-app/kommunity-frontend/pull/99","diff_url":"https://github.com/Kommunity-app/kommunity-frontend/pull/99.diff","patch_url":"https://github.com/Kommunity-app/kommunity-frontend/pull/99.patch","issue_url":"https://api.github.com/repos/Kommunity-app/kommunity-frontend/issues/99","number":99,"state":"open","locked":false,"title":"radio button","user":{"login":"yasintz","id":36041339,"node_id":"MDQ6VXNlcjM2MDQxMzM5","avatar_url":"https://avatars3.githubusercontent.com/u/36041339?v=4","gravatar_id":"","url":"https://api.github.com/users/yasintz","html_url":"https://github.com/yasintz","followers_url":"https://api.github.com/users/yasintz/followers","following_url":"https://api.github.com/users/yasintz/following{/other_user}","gists_url":"https://api.github.com/users/yasintz/gists{/gist_id}","starred_url":"https://api.github.com/users/yasintz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yasintz/subscriptions","organizations_url":"https://api.github.com/users/yasintz/orgs","repos_url":"https://api.github.com/users/yasintz/repos","events_url":"https://api.github.com/users/yasintz/events{/privacy}","received_events_url":"https://api.github.com/users/yasintz/received_events","type":"User","site_admin":false},"body":"![screenshot_13](https://user-images.githubusercontent.com/36041339/49345807-15265e80-f69b-11e8-9987-c356e342ff1f.png)\r\n","created_at":"2018-11-25T19:12:27Z","updated_at":"2018-12-07T06:50:22Z","closed_at":null,"merged_at":null,"merge_commit_sha":"036668f3adc8e0a1eed4f5d3424c1fe3600e72d1","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/Kommunity-app/kommunity-frontend/pulls/99/commits","review_comments_url":"https://api.github.com/repos/Kommunity-app/kommunity-frontend/pulls/99/comments","review_comment_url":"https://api.github.com/repos/Kommunity-app/kommunity-frontend/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Kommunity-app/kommunity-frontend/issues/99/comments","statuses_url":"https://api.github.com/repos/Kommunity-app/kommunity-frontend/statuses/d13b6dc2be696dbaecd85a9dc482daee4622f1f4","head":{"label":"yasintz:radio_button","ref":"radio_button","sha":"d13b6dc2be696dbaecd85a9dc482daee4622f1f4","user":{"login":"yasintz","id":36041339,"node_id":"MDQ6VXNlcjM2MDQxMzM5","avatar_url":"https://avatars3.githubusercontent.com/u/36041339?v=4","gravatar_id":"","url":"https://api.github.com/users/yasintz","html_url":"https://github.com/yasintz","followers_url":"https://api.github.com/users/yasintz/followers","following_url":"https://api.github.com/users/yasintz/following{/other_user}","gists_url":"https://api.github.com/users/yasintz/gists{/gist_id}","starred_url":"https://api.github.com/users/yasintz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yasintz/subscriptions","organizations_url":"https://api.github.com/users/yasintz/orgs","repos_url":"https://api.github.com/users/yasintz/repos","events_url":"https://api.github.com/users/yasintz/events{/privacy}","received_events_url":"https://api.github.com/users/yasintz/received_events","type":"User","site_admin":false},"repo":{"id":153353477,"node_id":"MDEwOlJlcG9zaXRvcnkxNTMzNTM0Nzc=","name":"kommunity-frontend","full_name":"yasintz/kommunity-frontend","private":false,"owner":{"login":"yasintz","id":36041339,"node_id":"MDQ6VXNlcjM2MDQxMzM5","avatar_url":"https://avatars3.githubusercontent.com/u/36041339?v=4","gravatar_id":"","url":"https://api.github.com/users/yasintz","html_url":"https://github.com/yasintz","followers_url":"https://api.github.com/users/yasintz/followers","following_url":"https://api.github.com/users/yasintz/following{/other_user}","gists_url":"https://api.github.com/users/yasintz/gists{/gist_id}","starred_url":"https://api.github.com/users/yasintz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yasintz/subscriptions","organizations_url":"https://api.github.com/users/yasintz/orgs","repos_url":"https://api.github.com/users/yasintz/repos","events_url":"https://api.github.com/users/yasintz/events{/privacy}","received_events_url":"https://api.github.com/users/yasintz/received_events","type":"User","site_admin":false},"html_url":"https://github.com/yasintz/kommunity-frontend","description":null,"fork":true,"url":"https://api.github.com/repos/yasintz/kommunity-frontend","forks_url":"https://api.github.com/repos/yasintz/kommunity-frontend/forks","keys_url":"https://api.github.com/repos/yasintz/kommunity-frontend/keys{/key_id}","collaborators_url":"https://api.github.com/repos/yasintz/kommunity-frontend/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/yasintz/kommunity-frontend/teams","hooks_url":"https://api.github.com/repos/yasintz/kommunity-frontend/hooks","issue_events_url":"https://api.github.com/repos/yasintz/kommunity-frontend/issues/events{/number}","events_url":"https://api.github.com/repos/yasintz/kommunity-frontend/events","assignees_url":"https://api.github.com/repos/yasintz/kommunity-frontend/assignees{/user}","branches_url":"https://api.github.com/repos/yasintz/kommunity-frontend/branches{/branch}","tags_url":"https://api.github.com/repos/yasintz/kommunity-frontend/tags","blobs_url":"https://api.github.com/repos/yasintz/kommunity-frontend/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/yasintz/kommunity-frontend/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/yasintz/kommunity-frontend/git/refs{/sha}","trees_url":"https://api.github.com/repos/yasintz/kommunity-frontend/git/trees{/sha}","statuses_url":"https://api.github.com/repos/yasintz/kommunity-frontend/statuses/{sha}","languages_url":"https://api.github.com/repos/yasintz/kommunity-frontend/languages","stargazers_url":"https://api.github.com/repos/yasintz/kommunity-frontend/stargazers","contributors_url":"https://api.github.com/repos/yasintz/kommunity-frontend/contributors","subscribers_url":"https://api.github.com/repos/yasintz/kommunity-frontend/subscribers","subscription_url":"https://api.github.com/repos/yasintz/kommunity-frontend/subscription","commits_url":"https://api.github.com/repos/yasintz/kommunity-frontend/commits{/sha}","git_commits_url":"https://api.github.com/repos/yasintz/kommunity-frontend/git/commits{/sha}","comments_url":"https://api.github.com/repos/yasintz/kommunity-frontend/comments{/number}","issue_comment_url":"https://api.github.com/repos/yasintz/kommunity-frontend/issues/comments{/number}","contents_url":"https://api.github.com/repos/yasintz/kommunity-frontend/contents/{+path}","compare_url":"https://api.github.com/repos/yasintz/kommunity-frontend/compare/{base}...{head}","merges_url":"https://api.github.com/repos/yasintz/kommunity-frontend/merges","archive_url":"https://api.github.com/repos/yasintz/kommunity-frontend/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/yasintz/kommunity-frontend/downloads","issues_url":"https://api.github.com/repos/yasintz/kommunity-frontend/issues{/number}","pulls_url":"https://api.github.com/repos/yasintz/kommunity-frontend/pulls{/number}","milestones_url":"https://api.github.com/repos/yasintz/kommunity-frontend/milestones{/number}","notifications_url":"https://api.github.com/repos/yasintz/kommunity-frontend/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/yasintz/kommunity-frontend/labels{/name}","releases_url":"https://api.github.com/repos/yasintz/kommunity-frontend/releases{/id}","deployments_url":"https://api.github.com/repos/yasintz/kommunity-frontend/deployments","created_at":"2018-10-16T20:59:45Z","updated_at":"2018-12-06T19:07:09Z","pushed_at":"2018-12-05T16:47:26Z","git_url":"git://github.com/yasintz/kommunity-frontend.git","ssh_url":"git@github.com:yasintz/kommunity-frontend.git","clone_url":"https://github.com/yasintz/kommunity-frontend.git","svn_url":"https://github.com/yasintz/kommunity-frontend","homepage":null,"size":2827,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","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":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"dev"}},"base":{"label":"Kommunity-app:dev","ref":"dev","sha":"55c25d6cb88d29b4462a3426101c65d1480d6c7f","user":{"login":"Kommunity-app","id":43939396,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQzOTM5Mzk2","avatar_url":"https://avatars3.githubusercontent.com/u/43939396?v=4","gravatar_id":"","url":"https://api.github.com/users/Kommunity-app","html_url":"https://github.com/Kommunity-app","followers_url":"https://api.github.com/users/Kommunity-app/followers","following_url":"https://api.github.com/users/Kommunity-app/following{/other_user}","gists_url":"https://api.github.com/users/Kommunity-app/gists{/gist_id}","starred_url":"https://api.github.com/users/Kommunity-app/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Kommunity-app/subscriptions","organizations_url":"https://api.github.com/users/Kommunity-app/orgs","repos_url":"https://api.github.com/users/Kommunity-app/repos","events_url":"https://api.github.com/users/Kommunity-app/events{/privacy}","received_events_url":"https://api.github.com/users/Kommunity-app/received_events","type":"Organization","site_admin":false},"repo":{"id":151990941,"node_id":"MDEwOlJlcG9zaXRvcnkxNTE5OTA5NDE=","name":"kommunity-frontend","full_name":"Kommunity-app/kommunity-frontend","private":false,"owner":{"login":"Kommunity-app","id":43939396,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQzOTM5Mzk2","avatar_url":"https://avatars3.githubusercontent.com/u/43939396?v=4","gravatar_id":"","url":"https://api.github.com/users/Kommunity-app","html_url":"https://github.com/Kommunity-app","followers_url":"https://api.github.com/users/Kommunity-app/followers","following_url":"https://api.github.com/users/Kommunity-app/following{/other_user}","gists_url":"https://api.github.com/users/Kommunity-app/gists{/gist_id}","starred_url":"https://api.github.com/users/Kommunity-app/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Kommunity-app/subscriptions","organizations_url":"https://api.github.com/users/Kommunity-app/orgs","repos_url":"https://api.github.com/users/Kommunity-app/repos","events_url":"https://api.github.com/users/Kommunity-app/events{/privacy}","received_events_url":"https://api.github.com/users/Kommunity-app/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/Kommunity-app/kommunity-frontend","description":null,"fork":false,"url":"https://api.github.com/repos/Kommunity-app/kommunity-frontend","forks_url":"https://api.github.com/repos/Kommunity-app/kommunity-frontend/forks","keys_url":"https://api.github.com/repos/Kommunity-app/kommunity-frontend/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Kommunity-app/kommunity-frontend/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Kommunity-app/kommunity-frontend/teams","hooks_url":"https://api.github.com/repos/Kommunity-app/kommunity-frontend/hooks","issue_events_url":"https://api.github.com/repos/Kommunity-app/kommunity-frontend/issues/events{/number}","events_url":"https://api.github.com/repos/Kommunity-app/kommunity-frontend/events","assignees_url":"https://api.github.com/repos/Kommunity-app/kommunity-frontend/assignees{/user}","branches_url":"https://api.github.com/repos/Kommunity-app/kommunity-frontend/branches{/branch}","tags_url":"https://api.github.com/repos/Kommunity-app/kommunity-frontend/tags","blobs_url":"https://api.github.com/repos/Kommunity-app/kommunity-frontend/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Kommunity-app/kommunity-frontend/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Kommunity-app/kommunity-frontend/git/refs{/sha}","trees_url":"https://api.github.com/repos/Kommunity-app/kommunity-frontend/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Kommunity-app/kommunity-frontend/statuses/{sha}","languages_url":"https://api.github.com/repos/Kommunity-app/kommunity-frontend/languages","stargazers_url":"https://api.github.com/repos/Kommunity-app/kommunity-frontend/stargazers","contributors_url":"https://api.github.com/repos/Kommunity-app/kommunity-frontend/contributors","subscribers_url":"https://api.github.com/repos/Kommunity-app/kommunity-frontend/subscribers","subscription_url":"https://api.github.com/repos/Kommunity-app/kommunity-frontend/subscription","commits_url":"https://api.github.com/repos/Kommunity-app/kommunity-frontend/commits{/sha}","git_commits_url":"https://api.github.com/repos/Kommunity-app/kommunity-frontend/git/commits{/sha}","comments_url":"https://api.github.com/repos/Kommunity-app/kommunity-frontend/comments{/number}","issue_comment_url":"https://api.github.com/repos/Kommunity-app/kommunity-frontend/issues/comments{/number}","contents_url":"https://api.github.com/repos/Kommunity-app/kommunity-frontend/contents/{+path}","compare_url":"https://api.github.com/repos/Kommunity-app/kommunity-frontend/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Kommunity-app/kommunity-frontend/merges","archive_url":"https://api.github.com/repos/Kommunity-app/kommunity-frontend/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Kommunity-app/kommunity-frontend/downloads","issues_url":"https://api.github.com/repos/Kommunity-app/kommunity-frontend/issues{/number}","pulls_url":"https://api.github.com/repos/Kommunity-app/kommunity-frontend/pulls{/number}","milestones_url":"https://api.github.com/repos/Kommunity-app/kommunity-frontend/milestones{/number}","notifications_url":"https://api.github.com/repos/Kommunity-app/kommunity-frontend/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Kommunity-app/kommunity-frontend/labels{/name}","releases_url":"https://api.github.com/repos/Kommunity-app/kommunity-frontend/releases{/id}","deployments_url":"https://api.github.com/repos/Kommunity-app/kommunity-frontend/deployments","created_at":"2018-10-07T22:30:07Z","updated_at":"2018-12-07T05:58:08Z","pushed_at":"2018-12-07T05:58:06Z","git_url":"git://github.com/Kommunity-app/kommunity-frontend.git","ssh_url":"git@github.com:Kommunity-app/kommunity-frontend.git","clone_url":"https://github.com/Kommunity-app/kommunity-frontend.git","svn_url":"https://github.com/Kommunity-app/kommunity-frontend","homepage":null,"size":2892,"stargazers_count":42,"watchers_count":42,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":21,"mirror_url":null,"archived":false,"open_issues_count":52,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":21,"open_issues":52,"watchers":42,"default_branch":"dev"}},"_links":{"self":{"href":"https://api.github.com/repos/Kommunity-app/kommunity-frontend/pulls/99"},"html":{"href":"https://github.com/Kommunity-app/kommunity-frontend/pull/99"},"issue":{"href":"https://api.github.com/repos/Kommunity-app/kommunity-frontend/issues/99"},"comments":{"href":"https://api.github.com/repos/Kommunity-app/kommunity-frontend/issues/99/comments"},"review_comments":{"href":"https://api.github.com/repos/Kommunity-app/kommunity-frontend/pulls/99/comments"},"review_comment":{"href":"https://api.github.com/repos/Kommunity-app/kommunity-frontend/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Kommunity-app/kommunity-frontend/pulls/99/commits"},"statuses":{"href":"https://api.github.com/repos/Kommunity-app/kommunity-frontend/statuses/d13b6dc2be696dbaecd85a9dc482daee4622f1f4"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"SelmanKahya"}}