{"action":"created","comment":{"url":"https://api.github.com/repos/reactjs/react-docgen/pulls/comments/57520205","id":57520205,"diff_hunk":"@@ -0,0 +1,43 @@\n+/*\n+ * Copyright (c) 2015, Facebook, Inc.\n+ * All rights reserved.\n+ *\n+ * This source code is licensed under the BSD-style license found in the\n+ * LICENSE file in the root directory of this source tree. An additional grant\n+ * of patent rights can be found in the PATENTS file in the same directory.\n+ *\n+ * @flow\n+ */\n+\n+import recast from 'recast';\n+\n+import getPropertyName from './getPropertyName';\n+\n+const {types: {namedTypes: types}} = recast;\n+\n+const componentMethods = [\n+  'render',\n+  'getInitialState',\n+  'getDefaultProps',\n+  'getChildContext',\n+  'componentWillMount',\n+  'componentDidMount',\n+  'componentWillReceiveProps',\n+  'shouldComponentUpdate',\n+  'componentWillUpdate',\n+  'componentDidUpdate',\n+  'componentWillUnmount',","path":"src/utils/isReactComponentMethod.js","position":29,"original_position":29,"commit_id":"eac9d3ec56245d65d8ab143dd64347185b96dc2b","original_commit_id":"eac9d3ec56245d65d8ab143dd64347185b96dc2b","user":{"login":"danez","id":231804,"avatar_url":"https://avatars.githubusercontent.com/u/231804?v=3","gravatar_id":"","url":"https://api.github.com/users/danez","html_url":"https://github.com/danez","followers_url":"https://api.github.com/users/danez/followers","following_url":"https://api.github.com/users/danez/following{/other_user}","gists_url":"https://api.github.com/users/danez/gists{/gist_id}","starred_url":"https://api.github.com/users/danez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danez/subscriptions","organizations_url":"https://api.github.com/users/danez/orgs","repos_url":"https://api.github.com/users/danez/repos","events_url":"https://api.github.com/users/danez/events{/privacy}","received_events_url":"https://api.github.com/users/danez/received_events","type":"User","site_admin":false},"body":"Should we add constructor here? Not sure if there is a case where the constructor could be needed in the documentation.","created_at":"2016-03-26T22:09:16Z","updated_at":"2016-03-26T22:09:16Z","html_url":"https://github.com/reactjs/react-docgen/pull/66#discussion_r57520205","pull_request_url":"https://api.github.com/repos/reactjs/react-docgen/pulls/66","_links":{"self":{"href":"https://api.github.com/repos/reactjs/react-docgen/pulls/comments/57520205"},"html":{"href":"https://github.com/reactjs/react-docgen/pull/66#discussion_r57520205"},"pull_request":{"href":"https://api.github.com/repos/reactjs/react-docgen/pulls/66"}}},"pull_request":{"url":"https://api.github.com/repos/reactjs/react-docgen/pulls/66","id":64133578,"html_url":"https://github.com/reactjs/react-docgen/pull/66","diff_url":"https://github.com/reactjs/react-docgen/pull/66.diff","patch_url":"https://github.com/reactjs/react-docgen/pull/66.patch","issue_url":"https://api.github.com/repos/reactjs/react-docgen/issues/66","number":66,"state":"open","locked":false,"title":"Extract documentation from Component methods","user":{"login":"janicduplessis","id":2677334,"avatar_url":"https://avatars.githubusercontent.com/u/2677334?v=3","gravatar_id":"","url":"https://api.github.com/users/janicduplessis","html_url":"https://github.com/janicduplessis","followers_url":"https://api.github.com/users/janicduplessis/followers","following_url":"https://api.github.com/users/janicduplessis/following{/other_user}","gists_url":"https://api.github.com/users/janicduplessis/gists{/gist_id}","starred_url":"https://api.github.com/users/janicduplessis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/janicduplessis/subscriptions","organizations_url":"https://api.github.com/users/janicduplessis/orgs","repos_url":"https://api.github.com/users/janicduplessis/repos","events_url":"https://api.github.com/users/janicduplessis/events{/privacy}","received_events_url":"https://api.github.com/users/janicduplessis/received_events","type":"User","site_admin":false},"body":"This adds documentation for methods of react components. It works with both React.createClass and classes. It reads from jsdoc blocks for descriptions and flow types for type information.\r\n\r\nIt supports:\r\n- name\r\n- description\r\n- parameters (type, description)\r\n- visibility ('public', 'protected', 'private') from jsdoc `@access` and `@private/@protected`\r\n- modifiers ('static', 'generator', 'async')\r\n- return (type, description)\r\n\r\nIt only removes react component methods and leaves removing private methods to the users if they choose so.\r\n\r\nTested on the react-native codebase.\r\n\r\nCloses #17\r\n\r\ncc @danez @fkling @vjeux  \r\n","created_at":"2016-03-25T05:50:57Z","updated_at":"2016-03-26T22:09:16Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d77eeb71c356015557bf87375ea49224ebc1e2fd","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/reactjs/react-docgen/pulls/66/commits","review_comments_url":"https://api.github.com/repos/reactjs/react-docgen/pulls/66/comments","review_comment_url":"https://api.github.com/repos/reactjs/react-docgen/pulls/comments{/number}","comments_url":"https://api.github.com/repos/reactjs/react-docgen/issues/66/comments","statuses_url":"https://api.github.com/repos/reactjs/react-docgen/statuses/eac9d3ec56245d65d8ab143dd64347185b96dc2b","head":{"label":"janicduplessis:master","ref":"master","sha":"eac9d3ec56245d65d8ab143dd64347185b96dc2b","user":{"login":"janicduplessis","id":2677334,"avatar_url":"https://avatars.githubusercontent.com/u/2677334?v=3","gravatar_id":"","url":"https://api.github.com/users/janicduplessis","html_url":"https://github.com/janicduplessis","followers_url":"https://api.github.com/users/janicduplessis/followers","following_url":"https://api.github.com/users/janicduplessis/following{/other_user}","gists_url":"https://api.github.com/users/janicduplessis/gists{/gist_id}","starred_url":"https://api.github.com/users/janicduplessis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/janicduplessis/subscriptions","organizations_url":"https://api.github.com/users/janicduplessis/orgs","repos_url":"https://api.github.com/users/janicduplessis/repos","events_url":"https://api.github.com/users/janicduplessis/events{/privacy}","received_events_url":"https://api.github.com/users/janicduplessis/received_events","type":"User","site_admin":false},"repo":{"id":54687803,"name":"react-docgen","full_name":"janicduplessis/react-docgen","owner":{"login":"janicduplessis","id":2677334,"avatar_url":"https://avatars.githubusercontent.com/u/2677334?v=3","gravatar_id":"","url":"https://api.github.com/users/janicduplessis","html_url":"https://github.com/janicduplessis","followers_url":"https://api.github.com/users/janicduplessis/followers","following_url":"https://api.github.com/users/janicduplessis/following{/other_user}","gists_url":"https://api.github.com/users/janicduplessis/gists{/gist_id}","starred_url":"https://api.github.com/users/janicduplessis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/janicduplessis/subscriptions","organizations_url":"https://api.github.com/users/janicduplessis/orgs","repos_url":"https://api.github.com/users/janicduplessis/repos","events_url":"https://api.github.com/users/janicduplessis/events{/privacy}","received_events_url":"https://api.github.com/users/janicduplessis/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/janicduplessis/react-docgen","description":"A CLI and toolbox to extract information from React component files for documentation generation purposes.","fork":true,"url":"https://api.github.com/repos/janicduplessis/react-docgen","forks_url":"https://api.github.com/repos/janicduplessis/react-docgen/forks","keys_url":"https://api.github.com/repos/janicduplessis/react-docgen/keys{/key_id}","collaborators_url":"https://api.github.com/repos/janicduplessis/react-docgen/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/janicduplessis/react-docgen/teams","hooks_url":"https://api.github.com/repos/janicduplessis/react-docgen/hooks","issue_events_url":"https://api.github.com/repos/janicduplessis/react-docgen/issues/events{/number}","events_url":"https://api.github.com/repos/janicduplessis/react-docgen/events","assignees_url":"https://api.github.com/repos/janicduplessis/react-docgen/assignees{/user}","branches_url":"https://api.github.com/repos/janicduplessis/react-docgen/branches{/branch}","tags_url":"https://api.github.com/repos/janicduplessis/react-docgen/tags","blobs_url":"https://api.github.com/repos/janicduplessis/react-docgen/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/janicduplessis/react-docgen/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/janicduplessis/react-docgen/git/refs{/sha}","trees_url":"https://api.github.com/repos/janicduplessis/react-docgen/git/trees{/sha}","statuses_url":"https://api.github.com/repos/janicduplessis/react-docgen/statuses/{sha}","languages_url":"https://api.github.com/repos/janicduplessis/react-docgen/languages","stargazers_url":"https://api.github.com/repos/janicduplessis/react-docgen/stargazers","contributors_url":"https://api.github.com/repos/janicduplessis/react-docgen/contributors","subscribers_url":"https://api.github.com/repos/janicduplessis/react-docgen/subscribers","subscription_url":"https://api.github.com/repos/janicduplessis/react-docgen/subscription","commits_url":"https://api.github.com/repos/janicduplessis/react-docgen/commits{/sha}","git_commits_url":"https://api.github.com/repos/janicduplessis/react-docgen/git/commits{/sha}","comments_url":"https://api.github.com/repos/janicduplessis/react-docgen/comments{/number}","issue_comment_url":"https://api.github.com/repos/janicduplessis/react-docgen/issues/comments{/number}","contents_url":"https://api.github.com/repos/janicduplessis/react-docgen/contents/{+path}","compare_url":"https://api.github.com/repos/janicduplessis/react-docgen/compare/{base}...{head}","merges_url":"https://api.github.com/repos/janicduplessis/react-docgen/merges","archive_url":"https://api.github.com/repos/janicduplessis/react-docgen/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/janicduplessis/react-docgen/downloads","issues_url":"https://api.github.com/repos/janicduplessis/react-docgen/issues{/number}","pulls_url":"https://api.github.com/repos/janicduplessis/react-docgen/pulls{/number}","milestones_url":"https://api.github.com/repos/janicduplessis/react-docgen/milestones{/number}","notifications_url":"https://api.github.com/repos/janicduplessis/react-docgen/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/janicduplessis/react-docgen/labels{/name}","releases_url":"https://api.github.com/repos/janicduplessis/react-docgen/releases{/id}","deployments_url":"https://api.github.com/repos/janicduplessis/react-docgen/deployments","created_at":"2016-03-25T02:14:12Z","updated_at":"2016-03-25T02:14:13Z","pushed_at":"2016-03-25T05:54:32Z","git_url":"git://github.com/janicduplessis/react-docgen.git","ssh_url":"git@github.com:janicduplessis/react-docgen.git","clone_url":"https://github.com/janicduplessis/react-docgen.git","svn_url":"https://github.com/janicduplessis/react-docgen","homepage":null,"size":192,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"reactjs:master","ref":"master","sha":"dca8ec9d57b4833f7ddb3164bedf4d74578eee1e","user":{"login":"reactjs","id":6412038,"avatar_url":"https://avatars.githubusercontent.com/u/6412038?v=3","gravatar_id":"","url":"https://api.github.com/users/reactjs","html_url":"https://github.com/reactjs","followers_url":"https://api.github.com/users/reactjs/followers","following_url":"https://api.github.com/users/reactjs/following{/other_user}","gists_url":"https://api.github.com/users/reactjs/gists{/gist_id}","starred_url":"https://api.github.com/users/reactjs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/reactjs/subscriptions","organizations_url":"https://api.github.com/users/reactjs/orgs","repos_url":"https://api.github.com/users/reactjs/repos","events_url":"https://api.github.com/users/reactjs/events{/privacy}","received_events_url":"https://api.github.com/users/reactjs/received_events","type":"Organization","site_admin":false},"repo":{"id":31441137,"name":"react-docgen","full_name":"reactjs/react-docgen","owner":{"login":"reactjs","id":6412038,"avatar_url":"https://avatars.githubusercontent.com/u/6412038?v=3","gravatar_id":"","url":"https://api.github.com/users/reactjs","html_url":"https://github.com/reactjs","followers_url":"https://api.github.com/users/reactjs/followers","following_url":"https://api.github.com/users/reactjs/following{/other_user}","gists_url":"https://api.github.com/users/reactjs/gists{/gist_id}","starred_url":"https://api.github.com/users/reactjs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/reactjs/subscriptions","organizations_url":"https://api.github.com/users/reactjs/orgs","repos_url":"https://api.github.com/users/reactjs/repos","events_url":"https://api.github.com/users/reactjs/events{/privacy}","received_events_url":"https://api.github.com/users/reactjs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/reactjs/react-docgen","description":"A CLI and toolbox to extract information from React component files for documentation generation purposes.","fork":false,"url":"https://api.github.com/repos/reactjs/react-docgen","forks_url":"https://api.github.com/repos/reactjs/react-docgen/forks","keys_url":"https://api.github.com/repos/reactjs/react-docgen/keys{/key_id}","collaborators_url":"https://api.github.com/repos/reactjs/react-docgen/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/reactjs/react-docgen/teams","hooks_url":"https://api.github.com/repos/reactjs/react-docgen/hooks","issue_events_url":"https://api.github.com/repos/reactjs/react-docgen/issues/events{/number}","events_url":"https://api.github.com/repos/reactjs/react-docgen/events","assignees_url":"https://api.github.com/repos/reactjs/react-docgen/assignees{/user}","branches_url":"https://api.github.com/repos/reactjs/react-docgen/branches{/branch}","tags_url":"https://api.github.com/repos/reactjs/react-docgen/tags","blobs_url":"https://api.github.com/repos/reactjs/react-docgen/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/reactjs/react-docgen/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/reactjs/react-docgen/git/refs{/sha}","trees_url":"https://api.github.com/repos/reactjs/react-docgen/git/trees{/sha}","statuses_url":"https://api.github.com/repos/reactjs/react-docgen/statuses/{sha}","languages_url":"https://api.github.com/repos/reactjs/react-docgen/languages","stargazers_url":"https://api.github.com/repos/reactjs/react-docgen/stargazers","contributors_url":"https://api.github.com/repos/reactjs/react-docgen/contributors","subscribers_url":"https://api.github.com/repos/reactjs/react-docgen/subscribers","subscription_url":"https://api.github.com/repos/reactjs/react-docgen/subscription","commits_url":"https://api.github.com/repos/reactjs/react-docgen/commits{/sha}","git_commits_url":"https://api.github.com/repos/reactjs/react-docgen/git/commits{/sha}","comments_url":"https://api.github.com/repos/reactjs/react-docgen/comments{/number}","issue_comment_url":"https://api.github.com/repos/reactjs/react-docgen/issues/comments{/number}","contents_url":"https://api.github.com/repos/reactjs/react-docgen/contents/{+path}","compare_url":"https://api.github.com/repos/reactjs/react-docgen/compare/{base}...{head}","merges_url":"https://api.github.com/repos/reactjs/react-docgen/merges","archive_url":"https://api.github.com/repos/reactjs/react-docgen/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/reactjs/react-docgen/downloads","issues_url":"https://api.github.com/repos/reactjs/react-docgen/issues{/number}","pulls_url":"https://api.github.com/repos/reactjs/react-docgen/pulls{/number}","milestones_url":"https://api.github.com/repos/reactjs/react-docgen/milestones{/number}","notifications_url":"https://api.github.com/repos/reactjs/react-docgen/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/reactjs/react-docgen/labels{/name}","releases_url":"https://api.github.com/repos/reactjs/react-docgen/releases{/id}","deployments_url":"https://api.github.com/repos/reactjs/react-docgen/deployments","created_at":"2015-02-27T22:03:34Z","updated_at":"2016-03-26T18:54:14Z","pushed_at":"2016-03-25T05:54:32Z","git_url":"git://github.com/reactjs/react-docgen.git","ssh_url":"git@github.com:reactjs/react-docgen.git","clone_url":"https://github.com/reactjs/react-docgen.git","svn_url":"https://github.com/reactjs/react-docgen","homepage":null,"size":209,"stargazers_count":471,"watchers_count":471,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":38,"mirror_url":null,"open_issues_count":16,"forks":38,"open_issues":16,"watchers":471,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/reactjs/react-docgen/pulls/66"},"html":{"href":"https://github.com/reactjs/react-docgen/pull/66"},"issue":{"href":"https://api.github.com/repos/reactjs/react-docgen/issues/66"},"comments":{"href":"https://api.github.com/repos/reactjs/react-docgen/issues/66/comments"},"review_comments":{"href":"https://api.github.com/repos/reactjs/react-docgen/pulls/66/comments"},"review_comment":{"href":"https://api.github.com/repos/reactjs/react-docgen/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/reactjs/react-docgen/pulls/66/commits"},"statuses":{"href":"https://api.github.com/repos/reactjs/react-docgen/statuses/eac9d3ec56245d65d8ab143dd64347185b96dc2b"}}}}