GitHub PullRequestReviewCommentEvent at 2014-06-16 13:57:51
Repository: gaia
Actor: julienw
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/comments/13806281","id":13806281,"diff_hunk":"@@ -780,6 +782,141 @@ suite('ActivityHandler', function() {\n       }\n     );\n \n+    suite('When there is an existing thread for a number', function() {\n+\n+        setup(function() {\n+          MessageManager.getMessages.restore();\n+          this.sinon.stub(MessageManager, 'getMessages');\n+          this.sinon.spy(ActivityHandler, 'toView');\n+        });\n+\n+        test('Message manager found no message : redirect to new message',\n+            function() {\n+          MockNavigatormozSetMessageHandler.mTrigger('activity', newActivity);\n+          MessageManager.getMessages.yieldTo('done');\n+          // threadId must be null\n+          ActivityHandler.toView.calledWithMatch({threadId: null, number: '123',\n+                                                 body: 'foo'});","path":"apps/sms/test/unit/activity_handler_test.js","position":35,"original_position":35,"commit_id":"8bbc0e125b68f2cb5b7f6d258be878539b7dc9cf","original_commit_id":"8bbc0e125b68f2cb5b7f6d258be878539b7dc9cf","user":{"login":"julienw","id":454175,"avatar_url":"https://avatars.githubusercontent.com/u/454175?","gravatar_id":"a2b625f331361a7110da59a907d79e95","url":"https://api.github.com/users/julienw","html_url":"https://github.com/julienw","followers_url":"https://api.github.com/users/julienw/followers","following_url":"https://api.github.com/users/julienw/following{/other_user}","gists_url":"https://api.github.com/users/julienw/gists{/gist_id}","starred_url":"https://api.github.com/users/julienw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/julienw/subscriptions","organizations_url":"https://api.github.com/users/julienw/orgs","repos_url":"https://api.github.com/users/julienw/repos","events_url":"https://api.github.com/users/julienw/events{/privacy}","received_events_url":"https://api.github.com/users/julienw/received_events","type":"User","site_admin":false},"body":"please indent your code like this:\r\n```javascript\r\nActivityHandler.toView.calledWithMatch({\r\n  threadId: null,\r\n  number: '123',\r\n  body: 'foo'\r\n});\r\n```\r\n\r\nIt's a proposal of course, but the rationale is:\r\n* more space is better than less space\r\n* logical indentation (the parameter is all in the same area of code -- it is here, so it's not wrong because of this)\r\n* maintainable indentation (the indentation you used here is not maintainable: if we eventually change `ActivityHandler` or `toView` we'll need to fix the indentation here even if the code does not change)\r\n\r\nYou can watch http://vimeo.com/97329157, good advices about all these things :)","created_at":"2014-06-16T13:57:51Z","updated_at":"2014-06-16T13:57:51Z","html_url":"https://github.com/mozilla-b2g/gaia/pull/16216#discussion_r13806281","pull_request_url":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/16216","_links":{"self":{"href":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/comments/13806281"},"html":{"href":"https://github.com/mozilla-b2g/gaia/pull/16216#discussion_r13806281"},"pull_request":{"href":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/16216"}}},"pull_request":{"url":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/16216","id":12469079,"html_url":"https://github.com/mozilla-b2g/gaia/pull/16216","diff_url":"https://github.com/mozilla-b2g/gaia/pull/16216.diff","patch_url":"https://github.com/mozilla-b2g/gaia/pull/16216.patch","issue_url":"https://api.github.com/repos/mozilla-b2g/gaia/issues/16216","number":16216,"state":"open","title":"Bug 918970 - display existing thread when sending a sms from contact app","user":{"login":"autra","id":1576598,"avatar_url":"https://avatars.githubusercontent.com/u/1576598?","gravatar_id":"b01d248b69ad9c1561c31b0175f4e4ee","url":"https://api.github.com/users/autra","html_url":"https://github.com/autra","followers_url":"https://api.github.com/users/autra/followers","following_url":"https://api.github.com/users/autra/following{/other_user}","gists_url":"https://api.github.com/users/autra/gists{/gist_id}","starred_url":"https://api.github.com/users/autra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/autra/subscriptions","organizations_url":"https://api.github.com/users/autra/orgs","repos_url":"https://api.github.com/users/autra/repos","events_url":"https://api.github.com/users/autra/events{/privacy}","received_events_url":"https://api.github.com/users/autra/received_events","type":"User","site_admin":false},"body":"","created_at":"2014-02-12T16:10:35Z","updated_at":"2014-06-16T13:57:51Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8c47880ba69a684d911c77faa230b0a2584a683b","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/16216/commits","review_comments_url":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/16216/comments","review_comment_url":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/comments/{number}","comments_url":"https://api.github.com/repos/mozilla-b2g/gaia/issues/16216/comments","statuses_url":"https://api.github.com/repos/mozilla-b2g/gaia/statuses/8bbc0e125b68f2cb5b7f6d258be878539b7dc9cf","head":{"label":"autra:bug918970","ref":"bug918970","sha":"8bbc0e125b68f2cb5b7f6d258be878539b7dc9cf","user":{"login":"autra","id":1576598,"avatar_url":"https://avatars.githubusercontent.com/u/1576598?","gravatar_id":"b01d248b69ad9c1561c31b0175f4e4ee","url":"https://api.github.com/users/autra","html_url":"https://github.com/autra","followers_url":"https://api.github.com/users/autra/followers","following_url":"https://api.github.com/users/autra/following{/other_user}","gists_url":"https://api.github.com/users/autra/gists{/gist_id}","starred_url":"https://api.github.com/users/autra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/autra/subscriptions","organizations_url":"https://api.github.com/users/autra/orgs","repos_url":"https://api.github.com/users/autra/repos","events_url":"https://api.github.com/users/autra/events{/privacy}","received_events_url":"https://api.github.com/users/autra/received_events","type":"User","site_admin":false},"repo":{"id":13416461,"name":"gaia","full_name":"autra/gaia","owner":{"login":"autra","id":1576598,"avatar_url":"https://avatars.githubusercontent.com/u/1576598?","gravatar_id":"b01d248b69ad9c1561c31b0175f4e4ee","url":"https://api.github.com/users/autra","html_url":"https://github.com/autra","followers_url":"https://api.github.com/users/autra/followers","following_url":"https://api.github.com/users/autra/following{/other_user}","gists_url":"https://api.github.com/users/autra/gists{/gist_id}","starred_url":"https://api.github.com/users/autra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/autra/subscriptions","organizations_url":"https://api.github.com/users/autra/orgs","repos_url":"https://api.github.com/users/autra/repos","events_url":"https://api.github.com/users/autra/events{/privacy}","received_events_url":"https://api.github.com/users/autra/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/autra/gaia","description":"Gaia is a HTML5-based Phone UI for the Boot 2 Gecko Project. NOTE: For details of what branches are used for what releases, see https://wiki.mozilla.org/Release_Management/B2G_Landing","fork":true,"url":"https://api.github.com/repos/autra/gaia","forks_url":"https://api.github.com/repos/autra/gaia/forks","keys_url":"https://api.github.com/repos/autra/gaia/keys{/key_id}","collaborators_url":"https://api.github.com/repos/autra/gaia/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/autra/gaia/teams","hooks_url":"https://api.github.com/repos/autra/gaia/hooks","issue_events_url":"https://api.github.com/repos/autra/gaia/issues/events{/number}","events_url":"https://api.github.com/repos/autra/gaia/events","assignees_url":"https://api.github.com/repos/autra/gaia/assignees{/user}","branches_url":"https://api.github.com/repos/autra/gaia/branches{/branch}","tags_url":"https://api.github.com/repos/autra/gaia/tags","blobs_url":"https://api.github.com/repos/autra/gaia/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/autra/gaia/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/autra/gaia/git/refs{/sha}","trees_url":"https://api.github.com/repos/autra/gaia/git/trees{/sha}","statuses_url":"https://api.github.com/repos/autra/gaia/statuses/{sha}","languages_url":"https://api.github.com/repos/autra/gaia/languages","stargazers_url":"https://api.github.com/repos/autra/gaia/stargazers","contributors_url":"https://api.github.com/repos/autra/gaia/contributors","subscribers_url":"https://api.github.com/repos/autra/gaia/subscribers","subscription_url":"https://api.github.com/repos/autra/gaia/subscription","commits_url":"https://api.github.com/repos/autra/gaia/commits{/sha}","git_commits_url":"https://api.github.com/repos/autra/gaia/git/commits{/sha}","comments_url":"https://api.github.com/repos/autra/gaia/comments{/number}","issue_comment_url":"https://api.github.com/repos/autra/gaia/issues/comments/{number}","contents_url":"https://api.github.com/repos/autra/gaia/contents/{+path}","compare_url":"https://api.github.com/repos/autra/gaia/compare/{base}...{head}","merges_url":"https://api.github.com/repos/autra/gaia/merges","archive_url":"https://api.github.com/repos/autra/gaia/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/autra/gaia/downloads","issues_url":"https://api.github.com/repos/autra/gaia/issues{/number}","pulls_url":"https://api.github.com/repos/autra/gaia/pulls{/number}","milestones_url":"https://api.github.com/repos/autra/gaia/milestones{/number}","notifications_url":"https://api.github.com/repos/autra/gaia/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/autra/gaia/labels{/name}","releases_url":"https://api.github.com/repos/autra/gaia/releases{/id}","created_at":"2013-10-08T14:53:25Z","updated_at":"2014-06-11T07:00:18Z","pushed_at":"2014-06-11T07:00:17Z","git_url":"git://github.com/autra/gaia.git","ssh_url":"git@github.com:autra/gaia.git","clone_url":"https://github.com/autra/gaia.git","svn_url":"https://github.com/autra/gaia","homepage":"https://wiki.mozilla.org/B2G","size":770182,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"mozilla-b2g:master","ref":"master","sha":"67b1679554cc517a5213aa2a746de26afe977eb8","user":{"login":"mozilla-b2g","id":1261292,"avatar_url":"https://avatars.githubusercontent.com/u/1261292?","gravatar_id":"b1de11f7d6ddaf7b9d527281297c2ee1","url":"https://api.github.com/users/mozilla-b2g","html_url":"https://github.com/mozilla-b2g","followers_url":"https://api.github.com/users/mozilla-b2g/followers","following_url":"https://api.github.com/users/mozilla-b2g/following{/other_user}","gists_url":"https://api.github.com/users/mozilla-b2g/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla-b2g/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla-b2g/subscriptions","organizations_url":"https://api.github.com/users/mozilla-b2g/orgs","repos_url":"https://api.github.com/users/mozilla-b2g/repos","events_url":"https://api.github.com/users/mozilla-b2g/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla-b2g/received_events","type":"Organization","site_admin":false},"repo":{"id":2317369,"name":"gaia","full_name":"mozilla-b2g/gaia","owner":{"login":"mozilla-b2g","id":1261292,"avatar_url":"https://avatars.githubusercontent.com/u/1261292?","gravatar_id":"b1de11f7d6ddaf7b9d527281297c2ee1","url":"https://api.github.com/users/mozilla-b2g","html_url":"https://github.com/mozilla-b2g","followers_url":"https://api.github.com/users/mozilla-b2g/followers","following_url":"https://api.github.com/users/mozilla-b2g/following{/other_user}","gists_url":"https://api.github.com/users/mozilla-b2g/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla-b2g/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla-b2g/subscriptions","organizations_url":"https://api.github.com/users/mozilla-b2g/orgs","repos_url":"https://api.github.com/users/mozilla-b2g/repos","events_url":"https://api.github.com/users/mozilla-b2g/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla-b2g/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mozilla-b2g/gaia","description":"Gaia is a HTML5-based Phone UI for the Boot 2 Gecko Project. NOTE: For details of what branches are used for what releases, see","fork":false,"url":"https://api.github.com/repos/mozilla-b2g/gaia","forks_url":"https://api.github.com/repos/mozilla-b2g/gaia/forks","keys_url":"https://api.github.com/repos/mozilla-b2g/gaia/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mozilla-b2g/gaia/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mozilla-b2g/gaia/teams","hooks_url":"https://api.github.com/repos/mozilla-b2g/gaia/hooks","issue_events_url":"https://api.github.com/repos/mozilla-b2g/gaia/issues/events{/number}","events_url":"https://api.github.com/repos/mozilla-b2g/gaia/events","assignees_url":"https://api.github.com/repos/mozilla-b2g/gaia/assignees{/user}","branches_url":"https://api.github.com/repos/mozilla-b2g/gaia/branches{/branch}","tags_url":"https://api.github.com/repos/mozilla-b2g/gaia/tags","blobs_url":"https://api.github.com/repos/mozilla-b2g/gaia/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mozilla-b2g/gaia/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mozilla-b2g/gaia/git/refs{/sha}","trees_url":"https://api.github.com/repos/mozilla-b2g/gaia/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mozilla-b2g/gaia/statuses/{sha}","languages_url":"https://api.github.com/repos/mozilla-b2g/gaia/languages","stargazers_url":"https://api.github.com/repos/mozilla-b2g/gaia/stargazers","contributors_url":"https://api.github.com/repos/mozilla-b2g/gaia/contributors","subscribers_url":"https://api.github.com/repos/mozilla-b2g/gaia/subscribers","subscription_url":"https://api.github.com/repos/mozilla-b2g/gaia/subscription","commits_url":"https://api.github.com/repos/mozilla-b2g/gaia/commits{/sha}","git_commits_url":"https://api.github.com/repos/mozilla-b2g/gaia/git/commits{/sha}","comments_url":"https://api.github.com/repos/mozilla-b2g/gaia/comments{/number}","issue_comment_url":"https://api.github.com/repos/mozilla-b2g/gaia/issues/comments/{number}","contents_url":"https://api.github.com/repos/mozilla-b2g/gaia/contents/{+path}","compare_url":"https://api.github.com/repos/mozilla-b2g/gaia/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mozilla-b2g/gaia/merges","archive_url":"https://api.github.com/repos/mozilla-b2g/gaia/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mozilla-b2g/gaia/downloads","issues_url":"https://api.github.com/repos/mozilla-b2g/gaia/issues{/number}","pulls_url":"https://api.github.com/repos/mozilla-b2g/gaia/pulls{/number}","milestones_url":"https://api.github.com/repos/mozilla-b2g/gaia/milestones{/number}","notifications_url":"https://api.github.com/repos/mozilla-b2g/gaia/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mozilla-b2g/gaia/labels{/name}","releases_url":"https://api.github.com/repos/mozilla-b2g/gaia/releases{/id}","created_at":"2011-09-03T01:38:46Z","updated_at":"2014-06-16T13:39:06Z","pushed_at":"2014-06-16T13:39:07Z","git_url":"git://github.com/mozilla-b2g/gaia.git","ssh_url":"git@github.com:mozilla-b2g/gaia.git","clone_url":"https://github.com/mozilla-b2g/gaia.git","svn_url":"https://github.com/mozilla-b2g/gaia","homepage":"https://wiki.mozilla.org/B2G","size":1205935,"stargazers_count":1628,"watchers_count":1628,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":false,"forks_count":1608,"mirror_url":null,"open_issues_count":1630,"forks":1608,"open_issues":1630,"watchers":1628,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/16216"},"html":{"href":"https://github.com/mozilla-b2g/gaia/pull/16216"},"issue":{"href":"https://api.github.com/repos/mozilla-b2g/gaia/issues/16216"},"comments":{"href":"https://api.github.com/repos/mozilla-b2g/gaia/issues/16216/comments"},"review_comments":{"href":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/16216/comments"},"review_comment":{"href":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/16216/commits"},"statuses":{"href":"https://api.github.com/repos/mozilla-b2g/gaia/statuses/8bbc0e125b68f2cb5b7f6d258be878539b7dc9cf"}}}}