{"action":"created","comment":{"url":"https://api.github.com/repos/facebook/react/pulls/comments/65263878","id":65263878,"diff_hunk":"@@ -0,0 +1,86 @@\n+/**","path":"scripts/error-extractor/index.js","position":1,"original_position":1,"commit_id":"c15fad4a9ba56cf238ea3839305b7c9dfecb5423","original_commit_id":"c15fad4a9ba56cf238ea3839305b7c9dfecb5423","user":{"login":"spicyj","id":6820,"avatar_url":"https://avatars.githubusercontent.com/u/6820?v=3","gravatar_id":"","url":"https://api.github.com/users/spicyj","html_url":"https://github.com/spicyj","followers_url":"https://api.github.com/users/spicyj/followers","following_url":"https://api.github.com/users/spicyj/following{/other_user}","gists_url":"https://api.github.com/users/spicyj/gists{/gist_id}","starred_url":"https://api.github.com/users/spicyj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spicyj/subscriptions","organizations_url":"https://api.github.com/users/spicyj/orgs","repos_url":"https://api.github.com/users/spicyj/repos","events_url":"https://api.github.com/users/spicyj/events{/privacy}","received_events_url":"https://api.github.com/users/spicyj/received_events","type":"User","site_admin":false},"body":"Can we call this `scripts/error-codes/extract-errors.js`? Then we can put code related to substituting the error codes here too later. And we can leave the codes in `scripts/error-codes/codes.json` or something.","created_at":"2016-05-31T21:13:02Z","updated_at":"2016-05-31T21:13:02Z","html_url":"https://github.com/facebook/react/pull/6882#discussion_r65263878","pull_request_url":"https://api.github.com/repos/facebook/react/pulls/6882","_links":{"self":{"href":"https://api.github.com/repos/facebook/react/pulls/comments/65263878"},"html":{"href":"https://github.com/facebook/react/pull/6882#discussion_r65263878"},"pull_request":{"href":"https://api.github.com/repos/facebook/react/pulls/6882"}}},"pull_request":{"url":"https://api.github.com/repos/facebook/react/pulls/6882","id":71504480,"html_url":"https://github.com/facebook/react/pull/6882","diff_url":"https://github.com/facebook/react/pull/6882.diff","patch_url":"https://github.com/facebook/react/pull/6882.patch","issue_url":"https://api.github.com/repos/facebook/react/issues/6882","number":6882,"state":"open","locked":false,"title":"Add a script for extracting error codes","user":{"login":"keyanzhang","id":2268452,"avatar_url":"https://avatars.githubusercontent.com/u/2268452?v=3","gravatar_id":"","url":"https://api.github.com/users/keyanzhang","html_url":"https://github.com/keyanzhang","followers_url":"https://api.github.com/users/keyanzhang/followers","following_url":"https://api.github.com/users/keyanzhang/following{/other_user}","gists_url":"https://api.github.com/users/keyanzhang/gists{/gist_id}","starred_url":"https://api.github.com/users/keyanzhang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/keyanzhang/subscriptions","organizations_url":"https://api.github.com/users/keyanzhang/orgs","repos_url":"https://api.github.com/users/keyanzhang/repos","events_url":"https://api.github.com/users/keyanzhang/events{/privacy}","received_events_url":"https://api.github.com/users/keyanzhang/received_events","type":"User","site_admin":false},"body":"As we talked in #6874, this is the first step that extracts error codes to a JSON file. The script adds any new error messages to the end of the file _without_ changing existing codes. The traversal order of files is determined by their (module) names so that the result is stable.\r\n\r\nI added `babel-traverse` and `babylon` as new dev dependencies, but they are [already required](https://github.com/babel/babel/blob/master/packages/babel-core/package.json#L34-L36) by `babel-core` so we actually just lifted them up.\r\n\r\nThanks for reviewing! CC @spicyj ","created_at":"2016-05-26T06:04:16Z","updated_at":"2016-05-31T21:13:02Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6693eecd989d9158c374f0160aef1010a95d803e","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/facebook/react/pulls/6882/commits","review_comments_url":"https://api.github.com/repos/facebook/react/pulls/6882/comments","review_comment_url":"https://api.github.com/repos/facebook/react/pulls/comments{/number}","comments_url":"https://api.github.com/repos/facebook/react/issues/6882/comments","statuses_url":"https://api.github.com/repos/facebook/react/statuses/c15fad4a9ba56cf238ea3839305b7c9dfecb5423","head":{"label":"keyanzhang:error-extractor","ref":"error-extractor","sha":"c15fad4a9ba56cf238ea3839305b7c9dfecb5423","user":{"login":"keyanzhang","id":2268452,"avatar_url":"https://avatars.githubusercontent.com/u/2268452?v=3","gravatar_id":"","url":"https://api.github.com/users/keyanzhang","html_url":"https://github.com/keyanzhang","followers_url":"https://api.github.com/users/keyanzhang/followers","following_url":"https://api.github.com/users/keyanzhang/following{/other_user}","gists_url":"https://api.github.com/users/keyanzhang/gists{/gist_id}","starred_url":"https://api.github.com/users/keyanzhang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/keyanzhang/subscriptions","organizations_url":"https://api.github.com/users/keyanzhang/orgs","repos_url":"https://api.github.com/users/keyanzhang/repos","events_url":"https://api.github.com/users/keyanzhang/events{/privacy}","received_events_url":"https://api.github.com/users/keyanzhang/received_events","type":"User","site_admin":false},"repo":{"id":55829506,"name":"react","full_name":"keyanzhang/react","owner":{"login":"keyanzhang","id":2268452,"avatar_url":"https://avatars.githubusercontent.com/u/2268452?v=3","gravatar_id":"","url":"https://api.github.com/users/keyanzhang","html_url":"https://github.com/keyanzhang","followers_url":"https://api.github.com/users/keyanzhang/followers","following_url":"https://api.github.com/users/keyanzhang/following{/other_user}","gists_url":"https://api.github.com/users/keyanzhang/gists{/gist_id}","starred_url":"https://api.github.com/users/keyanzhang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/keyanzhang/subscriptions","organizations_url":"https://api.github.com/users/keyanzhang/orgs","repos_url":"https://api.github.com/users/keyanzhang/repos","events_url":"https://api.github.com/users/keyanzhang/events{/privacy}","received_events_url":"https://api.github.com/users/keyanzhang/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/keyanzhang/react","description":"A declarative, efficient, and flexible JavaScript library for building user interfaces.","fork":true,"url":"https://api.github.com/repos/keyanzhang/react","forks_url":"https://api.github.com/repos/keyanzhang/react/forks","keys_url":"https://api.github.com/repos/keyanzhang/react/keys{/key_id}","collaborators_url":"https://api.github.com/repos/keyanzhang/react/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/keyanzhang/react/teams","hooks_url":"https://api.github.com/repos/keyanzhang/react/hooks","issue_events_url":"https://api.github.com/repos/keyanzhang/react/issues/events{/number}","events_url":"https://api.github.com/repos/keyanzhang/react/events","assignees_url":"https://api.github.com/repos/keyanzhang/react/assignees{/user}","branches_url":"https://api.github.com/repos/keyanzhang/react/branches{/branch}","tags_url":"https://api.github.com/repos/keyanzhang/react/tags","blobs_url":"https://api.github.com/repos/keyanzhang/react/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/keyanzhang/react/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/keyanzhang/react/git/refs{/sha}","trees_url":"https://api.github.com/repos/keyanzhang/react/git/trees{/sha}","statuses_url":"https://api.github.com/repos/keyanzhang/react/statuses/{sha}","languages_url":"https://api.github.com/repos/keyanzhang/react/languages","stargazers_url":"https://api.github.com/repos/keyanzhang/react/stargazers","contributors_url":"https://api.github.com/repos/keyanzhang/react/contributors","subscribers_url":"https://api.github.com/repos/keyanzhang/react/subscribers","subscription_url":"https://api.github.com/repos/keyanzhang/react/subscription","commits_url":"https://api.github.com/repos/keyanzhang/react/commits{/sha}","git_commits_url":"https://api.github.com/repos/keyanzhang/react/git/commits{/sha}","comments_url":"https://api.github.com/repos/keyanzhang/react/comments{/number}","issue_comment_url":"https://api.github.com/repos/keyanzhang/react/issues/comments{/number}","contents_url":"https://api.github.com/repos/keyanzhang/react/contents/{+path}","compare_url":"https://api.github.com/repos/keyanzhang/react/compare/{base}...{head}","merges_url":"https://api.github.com/repos/keyanzhang/react/merges","archive_url":"https://api.github.com/repos/keyanzhang/react/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/keyanzhang/react/downloads","issues_url":"https://api.github.com/repos/keyanzhang/react/issues{/number}","pulls_url":"https://api.github.com/repos/keyanzhang/react/pulls{/number}","milestones_url":"https://api.github.com/repos/keyanzhang/react/milestones{/number}","notifications_url":"https://api.github.com/repos/keyanzhang/react/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/keyanzhang/react/labels{/name}","releases_url":"https://api.github.com/repos/keyanzhang/react/releases{/id}","deployments_url":"https://api.github.com/repos/keyanzhang/react/deployments","created_at":"2016-04-09T06:26:18Z","updated_at":"2016-04-09T06:26:22Z","pushed_at":"2016-05-31T21:05:14Z","git_url":"git://github.com/keyanzhang/react.git","ssh_url":"git@github.com:keyanzhang/react.git","clone_url":"https://github.com/keyanzhang/react.git","svn_url":"https://github.com/keyanzhang/react","homepage":"https://facebook.github.io/react/","size":90911,"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":"facebook:master","ref":"master","sha":"1d3aceb6c3707b8f21b2b1b382cbe51339e51000","user":{"login":"facebook","id":69631,"avatar_url":"https://avatars.githubusercontent.com/u/69631?v=3","gravatar_id":"","url":"https://api.github.com/users/facebook","html_url":"https://github.com/facebook","followers_url":"https://api.github.com/users/facebook/followers","following_url":"https://api.github.com/users/facebook/following{/other_user}","gists_url":"https://api.github.com/users/facebook/gists{/gist_id}","starred_url":"https://api.github.com/users/facebook/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/facebook/subscriptions","organizations_url":"https://api.github.com/users/facebook/orgs","repos_url":"https://api.github.com/users/facebook/repos","events_url":"https://api.github.com/users/facebook/events{/privacy}","received_events_url":"https://api.github.com/users/facebook/received_events","type":"Organization","site_admin":false},"repo":{"id":10270250,"name":"react","full_name":"facebook/react","owner":{"login":"facebook","id":69631,"avatar_url":"https://avatars.githubusercontent.com/u/69631?v=3","gravatar_id":"","url":"https://api.github.com/users/facebook","html_url":"https://github.com/facebook","followers_url":"https://api.github.com/users/facebook/followers","following_url":"https://api.github.com/users/facebook/following{/other_user}","gists_url":"https://api.github.com/users/facebook/gists{/gist_id}","starred_url":"https://api.github.com/users/facebook/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/facebook/subscriptions","organizations_url":"https://api.github.com/users/facebook/orgs","repos_url":"https://api.github.com/users/facebook/repos","events_url":"https://api.github.com/users/facebook/events{/privacy}","received_events_url":"https://api.github.com/users/facebook/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/facebook/react","description":"A declarative, efficient, and flexible JavaScript library for building user interfaces.","fork":false,"url":"https://api.github.com/repos/facebook/react","forks_url":"https://api.github.com/repos/facebook/react/forks","keys_url":"https://api.github.com/repos/facebook/react/keys{/key_id}","collaborators_url":"https://api.github.com/repos/facebook/react/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/facebook/react/teams","hooks_url":"https://api.github.com/repos/facebook/react/hooks","issue_events_url":"https://api.github.com/repos/facebook/react/issues/events{/number}","events_url":"https://api.github.com/repos/facebook/react/events","assignees_url":"https://api.github.com/repos/facebook/react/assignees{/user}","branches_url":"https://api.github.com/repos/facebook/react/branches{/branch}","tags_url":"https://api.github.com/repos/facebook/react/tags","blobs_url":"https://api.github.com/repos/facebook/react/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/facebook/react/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/facebook/react/git/refs{/sha}","trees_url":"https://api.github.com/repos/facebook/react/git/trees{/sha}","statuses_url":"https://api.github.com/repos/facebook/react/statuses/{sha}","languages_url":"https://api.github.com/repos/facebook/react/languages","stargazers_url":"https://api.github.com/repos/facebook/react/stargazers","contributors_url":"https://api.github.com/repos/facebook/react/contributors","subscribers_url":"https://api.github.com/repos/facebook/react/subscribers","subscription_url":"https://api.github.com/repos/facebook/react/subscription","commits_url":"https://api.github.com/repos/facebook/react/commits{/sha}","git_commits_url":"https://api.github.com/repos/facebook/react/git/commits{/sha}","comments_url":"https://api.github.com/repos/facebook/react/comments{/number}","issue_comment_url":"https://api.github.com/repos/facebook/react/issues/comments{/number}","contents_url":"https://api.github.com/repos/facebook/react/contents/{+path}","compare_url":"https://api.github.com/repos/facebook/react/compare/{base}...{head}","merges_url":"https://api.github.com/repos/facebook/react/merges","archive_url":"https://api.github.com/repos/facebook/react/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/facebook/react/downloads","issues_url":"https://api.github.com/repos/facebook/react/issues{/number}","pulls_url":"https://api.github.com/repos/facebook/react/pulls{/number}","milestones_url":"https://api.github.com/repos/facebook/react/milestones{/number}","notifications_url":"https://api.github.com/repos/facebook/react/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/facebook/react/labels{/name}","releases_url":"https://api.github.com/repos/facebook/react/releases{/id}","deployments_url":"https://api.github.com/repos/facebook/react/deployments","created_at":"2013-05-24T16:15:54Z","updated_at":"2016-05-31T19:24:46Z","pushed_at":"2016-05-31T20:57:04Z","git_url":"git://github.com/facebook/react.git","ssh_url":"git@github.com:facebook/react.git","clone_url":"https://github.com/facebook/react.git","svn_url":"https://github.com/facebook/react","homepage":"https://facebook.github.io/react/","size":113224,"stargazers_count":42927,"watchers_count":42927,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":7307,"mirror_url":null,"open_issues_count":563,"forks":7307,"open_issues":563,"watchers":42927,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/facebook/react/pulls/6882"},"html":{"href":"https://github.com/facebook/react/pull/6882"},"issue":{"href":"https://api.github.com/repos/facebook/react/issues/6882"},"comments":{"href":"https://api.github.com/repos/facebook/react/issues/6882/comments"},"review_comments":{"href":"https://api.github.com/repos/facebook/react/pulls/6882/comments"},"review_comment":{"href":"https://api.github.com/repos/facebook/react/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/facebook/react/pulls/6882/commits"},"statuses":{"href":"https://api.github.com/repos/facebook/react/statuses/c15fad4a9ba56cf238ea3839305b7c9dfecb5423"}}}}
{"actor":{"display_login":"spicyj"}}