GitHub PullRequestReviewCommentEvent at 2014-09-05 23:13:51
Repository: j2me.js
Actor: mykmelez
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/andreasgal/j2me.js/pulls/comments/17203256","id":17203256,"diff_hunk":"@@ -5,31 +5,39 @@\n \n // Use only the info about the first SIM for the time being\n var mobileInfo = (function() {\n-  var networkID = \"001 0001\";\n-  var mcc = urlParams.mcc || \"310\"; // United States\n-  var mnc = urlParams.mnc || \"001\";\n+  var pad = function(num, len) {","path":"libs/mobileinfo.js","position":7,"original_position":7,"commit_id":"f535d63a04dc1e66f1a5d30e2cd5d7950122625c","original_commit_id":"f535d63a04dc1e66f1a5d30e2cd5d7950122625c","user":{"login":"mykmelez","id":305455,"avatar_url":"https://avatars.githubusercontent.com/u/305455?v=2","gravatar_id":"4bcc1646956acd3ee25234b34da91414","url":"https://api.github.com/users/mykmelez","html_url":"https://github.com/mykmelez","followers_url":"https://api.github.com/users/mykmelez/followers","following_url":"https://api.github.com/users/mykmelez/following{/other_user}","gists_url":"https://api.github.com/users/mykmelez/gists{/gist_id}","starred_url":"https://api.github.com/users/mykmelez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mykmelez/subscriptions","organizations_url":"https://api.github.com/users/mykmelez/orgs","repos_url":"https://api.github.com/users/mykmelez/repos","events_url":"https://api.github.com/users/mykmelez/events{/privacy}","received_events_url":"https://api.github.com/users/mykmelez/received_events","type":"User","site_admin":false},"body":"I don't think we can quite return the values \"as-is,\" because the Mobile Connection API returns numbers, while the URL parameters and default/placeholder values are strings. So we should at least convert the values to strings if they aren't already.\r\n\r\nAlso, we can't just use them as-is in the IMSI, because the [International mobile subscriber identity page on Wikipedia](http://en.wikipedia.org/wiki/International_mobile_subscriber_identity) says:\r\n\r\n> The first 3 digits are the mobile country code (MCC), which are followed by the mobile network code (MNC), either 2 digits (European standard) or 3 digits (North American standard). The length of the MNC depends on the value of the MCC.\r\n\r\nSo it sounds like the MNC part of the IMSI should be two digits for European countries. And perhaps other locales, as I see some two-digit MNCs outside Europe on the [Mobile country code page on Wikipedia](http://en.wikipedia.org/wiki/Mobile_country_code).\r\n\r\nWe could, however, pad it with up to two digits rather than three, which'll result in a two-digit IMSI for MNC < 100 and a three digit IMSI otherwise.\r\n\r\nSo I'll make the code pad more lazily, in native.js rather than mobileinfo.js, and then pad by only two digits when constructing the IMSI.\r\n","created_at":"2014-09-05T23:13:51Z","updated_at":"2014-09-05T23:13:51Z","html_url":"https://github.com/andreasgal/j2me.js/pull/206#discussion_r17203256","pull_request_url":"https://api.github.com/repos/andreasgal/j2me.js/pulls/206","_links":{"self":{"href":"https://api.github.com/repos/andreasgal/j2me.js/pulls/comments/17203256"},"html":{"href":"https://github.com/andreasgal/j2me.js/pull/206#discussion_r17203256"},"pull_request":{"href":"https://api.github.com/repos/andreasgal/j2me.js/pulls/206"}}},"pull_request":{"url":"https://api.github.com/repos/andreasgal/j2me.js/pulls/206","id":20837374,"html_url":"https://github.com/andreasgal/j2me.js/pull/206","diff_url":"https://github.com/andreasgal/j2me.js/pull/206.diff","patch_url":"https://github.com/andreasgal/j2me.js/pull/206.patch","issue_url":"https://api.github.com/repos/andreasgal/j2me.js/issues/206","number":206,"state":"open","locked":false,"title":"differentiate between network/ICC values for MCC/MNC; add msisdn","user":{"login":"mykmelez","id":305455,"avatar_url":"https://avatars.githubusercontent.com/u/305455?v=2","gravatar_id":"4bcc1646956acd3ee25234b34da91414","url":"https://api.github.com/users/mykmelez","html_url":"https://github.com/mykmelez","followers_url":"https://api.github.com/users/mykmelez/followers","following_url":"https://api.github.com/users/mykmelez/following{/other_user}","gists_url":"https://api.github.com/users/mykmelez/gists{/gist_id}","starred_url":"https://api.github.com/users/mykmelez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mykmelez/subscriptions","organizations_url":"https://api.github.com/users/mykmelez/orgs","repos_url":"https://api.github.com/users/mykmelez/repos","events_url":"https://api.github.com/users/mykmelez/events{/privacy}","received_events_url":"https://api.github.com/users/mykmelez/received_events","type":"User","site_admin":false},"body":"","created_at":"2014-09-05T21:57:59Z","updated_at":"2014-09-05T23:13:51Z","closed_at":null,"merged_at":null,"merge_commit_sha":"293d5f23fbc3a624550f7da9b10b029a5ca609ea","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/andreasgal/j2me.js/pulls/206/commits","review_comments_url":"https://api.github.com/repos/andreasgal/j2me.js/pulls/206/comments","review_comment_url":"https://api.github.com/repos/andreasgal/j2me.js/pulls/comments/{number}","comments_url":"https://api.github.com/repos/andreasgal/j2me.js/issues/206/comments","statuses_url":"https://api.github.com/repos/andreasgal/j2me.js/statuses/f535d63a04dc1e66f1a5d30e2cd5d7950122625c","head":{"label":"mykmelez:expand-mobile-info","ref":"expand-mobile-info","sha":"f535d63a04dc1e66f1a5d30e2cd5d7950122625c","user":{"login":"mykmelez","id":305455,"avatar_url":"https://avatars.githubusercontent.com/u/305455?v=2","gravatar_id":"4bcc1646956acd3ee25234b34da91414","url":"https://api.github.com/users/mykmelez","html_url":"https://github.com/mykmelez","followers_url":"https://api.github.com/users/mykmelez/followers","following_url":"https://api.github.com/users/mykmelez/following{/other_user}","gists_url":"https://api.github.com/users/mykmelez/gists{/gist_id}","starred_url":"https://api.github.com/users/mykmelez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mykmelez/subscriptions","organizations_url":"https://api.github.com/users/mykmelez/orgs","repos_url":"https://api.github.com/users/mykmelez/repos","events_url":"https://api.github.com/users/mykmelez/events{/privacy}","received_events_url":"https://api.github.com/users/mykmelez/received_events","type":"User","site_admin":false},"repo":{"id":22497156,"name":"j2me.js","full_name":"mykmelez/j2me.js","owner":{"login":"mykmelez","id":305455,"avatar_url":"https://avatars.githubusercontent.com/u/305455?v=2","gravatar_id":"4bcc1646956acd3ee25234b34da91414","url":"https://api.github.com/users/mykmelez","html_url":"https://github.com/mykmelez","followers_url":"https://api.github.com/users/mykmelez/followers","following_url":"https://api.github.com/users/mykmelez/following{/other_user}","gists_url":"https://api.github.com/users/mykmelez/gists{/gist_id}","starred_url":"https://api.github.com/users/mykmelez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mykmelez/subscriptions","organizations_url":"https://api.github.com/users/mykmelez/orgs","repos_url":"https://api.github.com/users/mykmelez/repos","events_url":"https://api.github.com/users/mykmelez/events{/privacy}","received_events_url":"https://api.github.com/users/mykmelez/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mykmelez/j2me.js","description":"J2ME VM in JavaScript","fork":true,"url":"https://api.github.com/repos/mykmelez/j2me.js","forks_url":"https://api.github.com/repos/mykmelez/j2me.js/forks","keys_url":"https://api.github.com/repos/mykmelez/j2me.js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mykmelez/j2me.js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mykmelez/j2me.js/teams","hooks_url":"https://api.github.com/repos/mykmelez/j2me.js/hooks","issue_events_url":"https://api.github.com/repos/mykmelez/j2me.js/issues/events{/number}","events_url":"https://api.github.com/repos/mykmelez/j2me.js/events","assignees_url":"https://api.github.com/repos/mykmelez/j2me.js/assignees{/user}","branches_url":"https://api.github.com/repos/mykmelez/j2me.js/branches{/branch}","tags_url":"https://api.github.com/repos/mykmelez/j2me.js/tags","blobs_url":"https://api.github.com/repos/mykmelez/j2me.js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mykmelez/j2me.js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mykmelez/j2me.js/git/refs{/sha}","trees_url":"https://api.github.com/repos/mykmelez/j2me.js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mykmelez/j2me.js/statuses/{sha}","languages_url":"https://api.github.com/repos/mykmelez/j2me.js/languages","stargazers_url":"https://api.github.com/repos/mykmelez/j2me.js/stargazers","contributors_url":"https://api.github.com/repos/mykmelez/j2me.js/contributors","subscribers_url":"https://api.github.com/repos/mykmelez/j2me.js/subscribers","subscription_url":"https://api.github.com/repos/mykmelez/j2me.js/subscription","commits_url":"https://api.github.com/repos/mykmelez/j2me.js/commits{/sha}","git_commits_url":"https://api.github.com/repos/mykmelez/j2me.js/git/commits{/sha}","comments_url":"https://api.github.com/repos/mykmelez/j2me.js/comments{/number}","issue_comment_url":"https://api.github.com/repos/mykmelez/j2me.js/issues/comments/{number}","contents_url":"https://api.github.com/repos/mykmelez/j2me.js/contents/{+path}","compare_url":"https://api.github.com/repos/mykmelez/j2me.js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mykmelez/j2me.js/merges","archive_url":"https://api.github.com/repos/mykmelez/j2me.js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mykmelez/j2me.js/downloads","issues_url":"https://api.github.com/repos/mykmelez/j2me.js/issues{/number}","pulls_url":"https://api.github.com/repos/mykmelez/j2me.js/pulls{/number}","milestones_url":"https://api.github.com/repos/mykmelez/j2me.js/milestones{/number}","notifications_url":"https://api.github.com/repos/mykmelez/j2me.js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mykmelez/j2me.js/labels{/name}","releases_url":"https://api.github.com/repos/mykmelez/j2me.js/releases{/id}","created_at":"2014-08-01T06:02:22Z","updated_at":"2014-08-01T06:25:28Z","pushed_at":"2014-09-05T21:57:41Z","git_url":"git://github.com/mykmelez/j2me.js.git","ssh_url":"git@github.com:mykmelez/j2me.js.git","clone_url":"https://github.com/mykmelez/j2me.js.git","svn_url":"https://github.com/mykmelez/j2me.js","homepage":null,"size":4400,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"andreasgal:master","ref":"master","sha":"8219c4755e1fc2bbc7b89431e23b04581702cd99","user":{"login":"andreasgal","id":313748,"avatar_url":"https://avatars.githubusercontent.com/u/313748?v=2","gravatar_id":"dc614466f1a6d8f9c0e7a868bda77196","url":"https://api.github.com/users/andreasgal","html_url":"https://github.com/andreasgal","followers_url":"https://api.github.com/users/andreasgal/followers","following_url":"https://api.github.com/users/andreasgal/following{/other_user}","gists_url":"https://api.github.com/users/andreasgal/gists{/gist_id}","starred_url":"https://api.github.com/users/andreasgal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andreasgal/subscriptions","organizations_url":"https://api.github.com/users/andreasgal/orgs","repos_url":"https://api.github.com/users/andreasgal/repos","events_url":"https://api.github.com/users/andreasgal/events{/privacy}","received_events_url":"https://api.github.com/users/andreasgal/received_events","type":"User","site_admin":false},"repo":{"id":21724513,"name":"j2me.js","full_name":"andreasgal/j2me.js","owner":{"login":"andreasgal","id":313748,"avatar_url":"https://avatars.githubusercontent.com/u/313748?v=2","gravatar_id":"dc614466f1a6d8f9c0e7a868bda77196","url":"https://api.github.com/users/andreasgal","html_url":"https://github.com/andreasgal","followers_url":"https://api.github.com/users/andreasgal/followers","following_url":"https://api.github.com/users/andreasgal/following{/other_user}","gists_url":"https://api.github.com/users/andreasgal/gists{/gist_id}","starred_url":"https://api.github.com/users/andreasgal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andreasgal/subscriptions","organizations_url":"https://api.github.com/users/andreasgal/orgs","repos_url":"https://api.github.com/users/andreasgal/repos","events_url":"https://api.github.com/users/andreasgal/events{/privacy}","received_events_url":"https://api.github.com/users/andreasgal/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/andreasgal/j2me.js","description":"J2ME VM in JavaScript","fork":false,"url":"https://api.github.com/repos/andreasgal/j2me.js","forks_url":"https://api.github.com/repos/andreasgal/j2me.js/forks","keys_url":"https://api.github.com/repos/andreasgal/j2me.js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/andreasgal/j2me.js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/andreasgal/j2me.js/teams","hooks_url":"https://api.github.com/repos/andreasgal/j2me.js/hooks","issue_events_url":"https://api.github.com/repos/andreasgal/j2me.js/issues/events{/number}","events_url":"https://api.github.com/repos/andreasgal/j2me.js/events","assignees_url":"https://api.github.com/repos/andreasgal/j2me.js/assignees{/user}","branches_url":"https://api.github.com/repos/andreasgal/j2me.js/branches{/branch}","tags_url":"https://api.github.com/repos/andreasgal/j2me.js/tags","blobs_url":"https://api.github.com/repos/andreasgal/j2me.js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/andreasgal/j2me.js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/andreasgal/j2me.js/git/refs{/sha}","trees_url":"https://api.github.com/repos/andreasgal/j2me.js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/andreasgal/j2me.js/statuses/{sha}","languages_url":"https://api.github.com/repos/andreasgal/j2me.js/languages","stargazers_url":"https://api.github.com/repos/andreasgal/j2me.js/stargazers","contributors_url":"https://api.github.com/repos/andreasgal/j2me.js/contributors","subscribers_url":"https://api.github.com/repos/andreasgal/j2me.js/subscribers","subscription_url":"https://api.github.com/repos/andreasgal/j2me.js/subscription","commits_url":"https://api.github.com/repos/andreasgal/j2me.js/commits{/sha}","git_commits_url":"https://api.github.com/repos/andreasgal/j2me.js/git/commits{/sha}","comments_url":"https://api.github.com/repos/andreasgal/j2me.js/comments{/number}","issue_comment_url":"https://api.github.com/repos/andreasgal/j2me.js/issues/comments/{number}","contents_url":"https://api.github.com/repos/andreasgal/j2me.js/contents/{+path}","compare_url":"https://api.github.com/repos/andreasgal/j2me.js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/andreasgal/j2me.js/merges","archive_url":"https://api.github.com/repos/andreasgal/j2me.js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/andreasgal/j2me.js/downloads","issues_url":"https://api.github.com/repos/andreasgal/j2me.js/issues{/number}","pulls_url":"https://api.github.com/repos/andreasgal/j2me.js/pulls{/number}","milestones_url":"https://api.github.com/repos/andreasgal/j2me.js/milestones{/number}","notifications_url":"https://api.github.com/repos/andreasgal/j2me.js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/andreasgal/j2me.js/labels{/name}","releases_url":"https://api.github.com/repos/andreasgal/j2me.js/releases{/id}","created_at":"2014-07-11T06:23:27Z","updated_at":"2014-09-02T16:28:07Z","pushed_at":"2014-09-05T22:04:54Z","git_url":"git://github.com/andreasgal/j2me.js.git","ssh_url":"git@github.com:andreasgal/j2me.js.git","clone_url":"https://github.com/andreasgal/j2me.js.git","svn_url":"https://github.com/andreasgal/j2me.js","homepage":null,"size":8291,"stargazers_count":9,"watchers_count":9,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"forks_count":3,"mirror_url":null,"open_issues_count":23,"forks":3,"open_issues":23,"watchers":9,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/andreasgal/j2me.js/pulls/206"},"html":{"href":"https://github.com/andreasgal/j2me.js/pull/206"},"issue":{"href":"https://api.github.com/repos/andreasgal/j2me.js/issues/206"},"comments":{"href":"https://api.github.com/repos/andreasgal/j2me.js/issues/206/comments"},"review_comments":{"href":"https://api.github.com/repos/andreasgal/j2me.js/pulls/206/comments"},"review_comment":{"href":"https://api.github.com/repos/andreasgal/j2me.js/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/andreasgal/j2me.js/pulls/206/commits"},"statuses":{"href":"https://api.github.com/repos/andreasgal/j2me.js/statuses/f535d63a04dc1e66f1a5d30e2cd5d7950122625c"}}}}