{"action":"opened","number":2263,"pull_request":{"url":"https://api.github.com/repos/mozilla/activity-stream/pulls/2263","id":111159085,"html_url":"https://github.com/mozilla/activity-stream/pull/2263","diff_url":"https://github.com/mozilla/activity-stream/pull/2263.diff","patch_url":"https://github.com/mozilla/activity-stream/pull/2263.patch","issue_url":"https://api.github.com/repos/mozilla/activity-stream/issues/2263","number":2263,"state":"open","locked":false,"title":"feat(mc): #2249 Add Store, Actions, Reducers, and Redux","user":{"login":"k88hudson","id":1455535,"avatar_url":"https://avatars0.githubusercontent.com/u/1455535?v=3","gravatar_id":"","url":"https://api.github.com/users/k88hudson","html_url":"https://github.com/k88hudson","followers_url":"https://api.github.com/users/k88hudson/followers","following_url":"https://api.github.com/users/k88hudson/following{/other_user}","gists_url":"https://api.github.com/users/k88hudson/gists{/gist_id}","starred_url":"https://api.github.com/users/k88hudson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/k88hudson/subscriptions","organizations_url":"https://api.github.com/users/k88hudson/orgs","repos_url":"https://api.github.com/users/k88hudson/repos","events_url":"https://api.github.com/users/k88hudson/events{/privacy}","received_events_url":"https://api.github.com/users/k88hudson/received_events","type":"User","site_admin":false},"body":"This patch adds a store, actions, reducers, and Redux to the system addon. \r\n\r\n## Tests\r\nI had to add a few things to help with tests, including:\r\n- `rewire`, a babel plugin that allows us to rewrite `import` statements;\r\n- `GlobalOverrider`, a utility to set and restore global variables (e.g. `Components.utils`). unfortunately `rewire` doesn't support globals.\r\n\r\nAs usual, run `testmc` to run the tests.\r\n\r\n## Code\r\nThe code creates a `Store` when Activity Stream starts up. It is essentially a wrapped Redux store that can also have `ActionSubscribers`, which are what `Feed`s used to be.\r\n\r\nAction subscribers expose an `onAction` function.  I've included a really simple one for now called `NewTabInit`, that just logs the initial state. When the `MessageManager` lands, it can properly be hooked up to send the initial state to the content page.\r\n\r\n## Manually testing\r\n\r\nTry running the code in Firefox and checking your console output. You should see the redux state logged by the `NewTabInit` Action subscriber.","created_at":"2017-03-16T20:32:42Z","updated_at":"2017-03-16T20:32:42Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/mozilla/activity-stream/pulls/2263/commits","review_comments_url":"https://api.github.com/repos/mozilla/activity-stream/pulls/2263/comments","review_comment_url":"https://api.github.com/repos/mozilla/activity-stream/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mozilla/activity-stream/issues/2263/comments","statuses_url":"https://api.github.com/repos/mozilla/activity-stream/statuses/9b6019479c7b19edde1bff0533a97acf2febc5a5","head":{"label":"k88hudson:gh2249","ref":"gh2249","sha":"9b6019479c7b19edde1bff0533a97acf2febc5a5","user":{"login":"k88hudson","id":1455535,"avatar_url":"https://avatars0.githubusercontent.com/u/1455535?v=3","gravatar_id":"","url":"https://api.github.com/users/k88hudson","html_url":"https://github.com/k88hudson","followers_url":"https://api.github.com/users/k88hudson/followers","following_url":"https://api.github.com/users/k88hudson/following{/other_user}","gists_url":"https://api.github.com/users/k88hudson/gists{/gist_id}","starred_url":"https://api.github.com/users/k88hudson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/k88hudson/subscriptions","organizations_url":"https://api.github.com/users/k88hudson/orgs","repos_url":"https://api.github.com/users/k88hudson/repos","events_url":"https://api.github.com/users/k88hudson/events{/privacy}","received_events_url":"https://api.github.com/users/k88hudson/received_events","type":"User","site_admin":false},"repo":{"id":52153556,"name":"activity-stream","full_name":"k88hudson/activity-stream","owner":{"login":"k88hudson","id":1455535,"avatar_url":"https://avatars0.githubusercontent.com/u/1455535?v=3","gravatar_id":"","url":"https://api.github.com/users/k88hudson","html_url":"https://github.com/k88hudson","followers_url":"https://api.github.com/users/k88hudson/followers","following_url":"https://api.github.com/users/k88hudson/following{/other_user}","gists_url":"https://api.github.com/users/k88hudson/gists{/gist_id}","starred_url":"https://api.github.com/users/k88hudson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/k88hudson/subscriptions","organizations_url":"https://api.github.com/users/k88hudson/orgs","repos_url":"https://api.github.com/users/k88hudson/repos","events_url":"https://api.github.com/users/k88hudson/events{/privacy}","received_events_url":"https://api.github.com/users/k88hudson/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/k88hudson/activity-stream","description":" MVP prototype add-on for activity streams","fork":true,"url":"https://api.github.com/repos/k88hudson/activity-stream","forks_url":"https://api.github.com/repos/k88hudson/activity-stream/forks","keys_url":"https://api.github.com/repos/k88hudson/activity-stream/keys{/key_id}","collaborators_url":"https://api.github.com/repos/k88hudson/activity-stream/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/k88hudson/activity-stream/teams","hooks_url":"https://api.github.com/repos/k88hudson/activity-stream/hooks","issue_events_url":"https://api.github.com/repos/k88hudson/activity-stream/issues/events{/number}","events_url":"https://api.github.com/repos/k88hudson/activity-stream/events","assignees_url":"https://api.github.com/repos/k88hudson/activity-stream/assignees{/user}","branches_url":"https://api.github.com/repos/k88hudson/activity-stream/branches{/branch}","tags_url":"https://api.github.com/repos/k88hudson/activity-stream/tags","blobs_url":"https://api.github.com/repos/k88hudson/activity-stream/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/k88hudson/activity-stream/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/k88hudson/activity-stream/git/refs{/sha}","trees_url":"https://api.github.com/repos/k88hudson/activity-stream/git/trees{/sha}","statuses_url":"https://api.github.com/repos/k88hudson/activity-stream/statuses/{sha}","languages_url":"https://api.github.com/repos/k88hudson/activity-stream/languages","stargazers_url":"https://api.github.com/repos/k88hudson/activity-stream/stargazers","contributors_url":"https://api.github.com/repos/k88hudson/activity-stream/contributors","subscribers_url":"https://api.github.com/repos/k88hudson/activity-stream/subscribers","subscription_url":"https://api.github.com/repos/k88hudson/activity-stream/subscription","commits_url":"https://api.github.com/repos/k88hudson/activity-stream/commits{/sha}","git_commits_url":"https://api.github.com/repos/k88hudson/activity-stream/git/commits{/sha}","comments_url":"https://api.github.com/repos/k88hudson/activity-stream/comments{/number}","issue_comment_url":"https://api.github.com/repos/k88hudson/activity-stream/issues/comments{/number}","contents_url":"https://api.github.com/repos/k88hudson/activity-stream/contents/{+path}","compare_url":"https://api.github.com/repos/k88hudson/activity-stream/compare/{base}...{head}","merges_url":"https://api.github.com/repos/k88hudson/activity-stream/merges","archive_url":"https://api.github.com/repos/k88hudson/activity-stream/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/k88hudson/activity-stream/downloads","issues_url":"https://api.github.com/repos/k88hudson/activity-stream/issues{/number}","pulls_url":"https://api.github.com/repos/k88hudson/activity-stream/pulls{/number}","milestones_url":"https://api.github.com/repos/k88hudson/activity-stream/milestones{/number}","notifications_url":"https://api.github.com/repos/k88hudson/activity-stream/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/k88hudson/activity-stream/labels{/name}","releases_url":"https://api.github.com/repos/k88hudson/activity-stream/releases{/id}","deployments_url":"https://api.github.com/repos/k88hudson/activity-stream/deployments","created_at":"2016-02-20T13:02:48Z","updated_at":"2016-05-10T16:02:20Z","pushed_at":"2017-03-16T20:22:57Z","git_url":"git://github.com/k88hudson/activity-stream.git","ssh_url":"git@github.com:k88hudson/activity-stream.git","clone_url":"https://github.com/k88hudson/activity-stream.git","svn_url":"https://github.com/k88hudson/activity-stream","homepage":"","size":3474,"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":"mozilla:master","ref":"master","sha":"5f65259dc57e4612d28d236ec5f208fba8fcd50f","user":{"login":"mozilla","id":131524,"avatar_url":"https://avatars1.githubusercontent.com/u/131524?v=3","gravatar_id":"","url":"https://api.github.com/users/mozilla","html_url":"https://github.com/mozilla","followers_url":"https://api.github.com/users/mozilla/followers","following_url":"https://api.github.com/users/mozilla/following{/other_user}","gists_url":"https://api.github.com/users/mozilla/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla/subscriptions","organizations_url":"https://api.github.com/users/mozilla/orgs","repos_url":"https://api.github.com/users/mozilla/repos","events_url":"https://api.github.com/users/mozilla/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla/received_events","type":"Organization","site_admin":false},"repo":{"id":50695589,"name":"activity-stream","full_name":"mozilla/activity-stream","owner":{"login":"mozilla","id":131524,"avatar_url":"https://avatars1.githubusercontent.com/u/131524?v=3","gravatar_id":"","url":"https://api.github.com/users/mozilla","html_url":"https://github.com/mozilla","followers_url":"https://api.github.com/users/mozilla/followers","following_url":"https://api.github.com/users/mozilla/following{/other_user}","gists_url":"https://api.github.com/users/mozilla/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla/subscriptions","organizations_url":"https://api.github.com/users/mozilla/orgs","repos_url":"https://api.github.com/users/mozilla/repos","events_url":"https://api.github.com/users/mozilla/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mozilla/activity-stream","description":" MVP prototype add-on for activity streams","fork":false,"url":"https://api.github.com/repos/mozilla/activity-stream","forks_url":"https://api.github.com/repos/mozilla/activity-stream/forks","keys_url":"https://api.github.com/repos/mozilla/activity-stream/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mozilla/activity-stream/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mozilla/activity-stream/teams","hooks_url":"https://api.github.com/repos/mozilla/activity-stream/hooks","issue_events_url":"https://api.github.com/repos/mozilla/activity-stream/issues/events{/number}","events_url":"https://api.github.com/repos/mozilla/activity-stream/events","assignees_url":"https://api.github.com/repos/mozilla/activity-stream/assignees{/user}","branches_url":"https://api.github.com/repos/mozilla/activity-stream/branches{/branch}","tags_url":"https://api.github.com/repos/mozilla/activity-stream/tags","blobs_url":"https://api.github.com/repos/mozilla/activity-stream/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mozilla/activity-stream/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mozilla/activity-stream/git/refs{/sha}","trees_url":"https://api.github.com/repos/mozilla/activity-stream/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mozilla/activity-stream/statuses/{sha}","languages_url":"https://api.github.com/repos/mozilla/activity-stream/languages","stargazers_url":"https://api.github.com/repos/mozilla/activity-stream/stargazers","contributors_url":"https://api.github.com/repos/mozilla/activity-stream/contributors","subscribers_url":"https://api.github.com/repos/mozilla/activity-stream/subscribers","subscription_url":"https://api.github.com/repos/mozilla/activity-stream/subscription","commits_url":"https://api.github.com/repos/mozilla/activity-stream/commits{/sha}","git_commits_url":"https://api.github.com/repos/mozilla/activity-stream/git/commits{/sha}","comments_url":"https://api.github.com/repos/mozilla/activity-stream/comments{/number}","issue_comment_url":"https://api.github.com/repos/mozilla/activity-stream/issues/comments{/number}","contents_url":"https://api.github.com/repos/mozilla/activity-stream/contents/{+path}","compare_url":"https://api.github.com/repos/mozilla/activity-stream/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mozilla/activity-stream/merges","archive_url":"https://api.github.com/repos/mozilla/activity-stream/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mozilla/activity-stream/downloads","issues_url":"https://api.github.com/repos/mozilla/activity-stream/issues{/number}","pulls_url":"https://api.github.com/repos/mozilla/activity-stream/pulls{/number}","milestones_url":"https://api.github.com/repos/mozilla/activity-stream/milestones{/number}","notifications_url":"https://api.github.com/repos/mozilla/activity-stream/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mozilla/activity-stream/labels{/name}","releases_url":"https://api.github.com/repos/mozilla/activity-stream/releases{/id}","deployments_url":"https://api.github.com/repos/mozilla/activity-stream/deployments","created_at":"2016-01-29T22:28:26Z","updated_at":"2017-03-15T11:51:59Z","pushed_at":"2017-03-16T20:31:53Z","git_url":"git://github.com/mozilla/activity-stream.git","ssh_url":"git@github.com:mozilla/activity-stream.git","clone_url":"https://github.com/mozilla/activity-stream.git","svn_url":"https://github.com/mozilla/activity-stream","homepage":"","size":3763,"stargazers_count":97,"watchers_count":97,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":47,"mirror_url":null,"open_issues_count":199,"forks":47,"open_issues":199,"watchers":97,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mozilla/activity-stream/pulls/2263"},"html":{"href":"https://github.com/mozilla/activity-stream/pull/2263"},"issue":{"href":"https://api.github.com/repos/mozilla/activity-stream/issues/2263"},"comments":{"href":"https://api.github.com/repos/mozilla/activity-stream/issues/2263/comments"},"review_comments":{"href":"https://api.github.com/repos/mozilla/activity-stream/pulls/2263/comments"},"review_comment":{"href":"https://api.github.com/repos/mozilla/activity-stream/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mozilla/activity-stream/pulls/2263/commits"},"statuses":{"href":"https://api.github.com/repos/mozilla/activity-stream/statuses/9b6019479c7b19edde1bff0533a97acf2febc5a5"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":true,"commits":1,"additions":1693,"deletions":10,"changed_files":14}}
{"actor":{"display_login":"k88hudson"}}