{"action":"created","comment":{"url":"https://api.github.com/repos/Microsoft/cordova-plugin-code-push/pulls/comments/63406582","id":63406582,"diff_hunk":"@@ -0,0 +1,80 @@\n+package com.microsoft.cordova;\n+\n+import org.json.JSONException;\n+import org.json.JSONObject;\n+\n+public class StatusReport {\n+\n+    private static final String STATUS_KEY = \"status\";\n+    private static final String LABEL_KEY = \"label\";\n+    private static final String APP_VERSION_KEY = \"appVersion\";\n+    private static final String DEPLOYMENT_KEY_KEY = \"deploymentKey\";\n+    private static final String LAST_VERSION_LABEL_OR_APP_VERSION_KEY = \"lastVersionLabelOrAppVersion\";\n+    private static final String LAST_VERSION_DEPLOYMENT_KEY_KEY = \"lastVersionDeploymentKey\";\n+\n+    ReportingStatus status;\n+    String label;\n+    String appVersion;\n+    String deploymentKey;\n+    String lastVersionLabelOrAppVersion;\n+    String lastVersionDeploymentKey;\n+\n+    public StatusReport(int status, String label, String appVersion, String deploymentKey, String lastVersionLabelOrAppVersion, String lastVersionDeploymentKey) {","path":"src/android/StatusReport.java","position":22,"original_position":22,"commit_id":"07d3aced979c8068c8d1e884e09841c6837e6eae","original_commit_id":"07d3aced979c8068c8d1e884e09841c6837e6eae","user":{"login":"scottbommarito","id":18014088,"avatar_url":"https://avatars.githubusercontent.com/u/18014088?v=3","gravatar_id":"","url":"https://api.github.com/users/scottbommarito","html_url":"https://github.com/scottbommarito","followers_url":"https://api.github.com/users/scottbommarito/followers","following_url":"https://api.github.com/users/scottbommarito/following{/other_user}","gists_url":"https://api.github.com/users/scottbommarito/gists{/gist_id}","starred_url":"https://api.github.com/users/scottbommarito/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scottbommarito/subscriptions","organizations_url":"https://api.github.com/users/scottbommarito/orgs","repos_url":"https://api.github.com/users/scottbommarito/repos","events_url":"https://api.github.com/users/scottbommarito/events{/privacy}","received_events_url":"https://api.github.com/users/scottbommarito/received_events","type":"User","site_admin":false},"body":"consistency...but that's fine haha","created_at":"2016-05-16T19:02:14Z","updated_at":"2016-05-16T19:02:14Z","html_url":"https://github.com/Microsoft/cordova-plugin-code-push/pull/121#discussion_r63406582","pull_request_url":"https://api.github.com/repos/Microsoft/cordova-plugin-code-push/pulls/121","_links":{"self":{"href":"https://api.github.com/repos/Microsoft/cordova-plugin-code-push/pulls/comments/63406582"},"html":{"href":"https://github.com/Microsoft/cordova-plugin-code-push/pull/121#discussion_r63406582"},"pull_request":{"href":"https://api.github.com/repos/Microsoft/cordova-plugin-code-push/pulls/121"}}},"pull_request":{"url":"https://api.github.com/repos/Microsoft/cordova-plugin-code-push/pulls/121","id":69951138,"html_url":"https://github.com/Microsoft/cordova-plugin-code-push/pull/121","diff_url":"https://github.com/Microsoft/cordova-plugin-code-push/pull/121.diff","patch_url":"https://github.com/Microsoft/cordova-plugin-code-push/pull/121.patch","issue_url":"https://api.github.com/repos/Microsoft/cordova-plugin-code-push/issues/121","number":121,"state":"open","locked":false,"title":"Retry reportStatus if failure","user":{"login":"geof90","id":8598682,"avatar_url":"https://avatars.githubusercontent.com/u/8598682?v=3","gravatar_id":"","url":"https://api.github.com/users/geof90","html_url":"https://github.com/geof90","followers_url":"https://api.github.com/users/geof90/followers","following_url":"https://api.github.com/users/geof90/following{/other_user}","gists_url":"https://api.github.com/users/geof90/gists{/gist_id}","starred_url":"https://api.github.com/users/geof90/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/geof90/subscriptions","organizations_url":"https://api.github.com/users/geof90/orgs","repos_url":"https://api.github.com/users/geof90/repos","events_url":"https://api.github.com/users/geof90/events{/privacy}","received_events_url":"https://api.github.com/users/geof90/received_events","type":"User","site_admin":false},"body":"This PR improves the reportStatus mechanism in order to make sure that metrics reporting calls are not lost due to bad network conditions, hence prevents metrics numbers from being \"corrupted\".\r\n\r\nIn a nutshell, if the call to the server fails/times out, we will save a copy of the statusReport in the Preferences, and retry again the next time the app resumes.","created_at":"2016-05-13T06:58:24Z","updated_at":"2016-05-16T19:02:14Z","closed_at":null,"merged_at":null,"merge_commit_sha":"75b0b3fd8fbafae3069e5c8a13f04cda06825f18","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Microsoft/cordova-plugin-code-push/pulls/121/commits","review_comments_url":"https://api.github.com/repos/Microsoft/cordova-plugin-code-push/pulls/121/comments","review_comment_url":"https://api.github.com/repos/Microsoft/cordova-plugin-code-push/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Microsoft/cordova-plugin-code-push/issues/121/comments","statuses_url":"https://api.github.com/repos/Microsoft/cordova-plugin-code-push/statuses/07d3aced979c8068c8d1e884e09841c6837e6eae","head":{"label":"Microsoft:improve-report-status","ref":"improve-report-status","sha":"07d3aced979c8068c8d1e884e09841c6837e6eae","user":{"login":"Microsoft","id":6154722,"avatar_url":"https://avatars.githubusercontent.com/u/6154722?v=3","gravatar_id":"","url":"https://api.github.com/users/Microsoft","html_url":"https://github.com/Microsoft","followers_url":"https://api.github.com/users/Microsoft/followers","following_url":"https://api.github.com/users/Microsoft/following{/other_user}","gists_url":"https://api.github.com/users/Microsoft/gists{/gist_id}","starred_url":"https://api.github.com/users/Microsoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Microsoft/subscriptions","organizations_url":"https://api.github.com/users/Microsoft/orgs","repos_url":"https://api.github.com/users/Microsoft/repos","events_url":"https://api.github.com/users/Microsoft/events{/privacy}","received_events_url":"https://api.github.com/users/Microsoft/received_events","type":"Organization","site_admin":false},"repo":{"id":41043374,"name":"cordova-plugin-code-push","full_name":"Microsoft/cordova-plugin-code-push","owner":{"login":"Microsoft","id":6154722,"avatar_url":"https://avatars.githubusercontent.com/u/6154722?v=3","gravatar_id":"","url":"https://api.github.com/users/Microsoft","html_url":"https://github.com/Microsoft","followers_url":"https://api.github.com/users/Microsoft/followers","following_url":"https://api.github.com/users/Microsoft/following{/other_user}","gists_url":"https://api.github.com/users/Microsoft/gists{/gist_id}","starred_url":"https://api.github.com/users/Microsoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Microsoft/subscriptions","organizations_url":"https://api.github.com/users/Microsoft/orgs","repos_url":"https://api.github.com/users/Microsoft/repos","events_url":"https://api.github.com/users/Microsoft/events{/privacy}","received_events_url":"https://api.github.com/users/Microsoft/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Microsoft/cordova-plugin-code-push","description":"Cordova plugin for CodePush","fork":false,"url":"https://api.github.com/repos/Microsoft/cordova-plugin-code-push","forks_url":"https://api.github.com/repos/Microsoft/cordova-plugin-code-push/forks","keys_url":"https://api.github.com/repos/Microsoft/cordova-plugin-code-push/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Microsoft/cordova-plugin-code-push/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Microsoft/cordova-plugin-code-push/teams","hooks_url":"https://api.github.com/repos/Microsoft/cordova-plugin-code-push/hooks","issue_events_url":"https://api.github.com/repos/Microsoft/cordova-plugin-code-push/issues/events{/number}","events_url":"https://api.github.com/repos/Microsoft/cordova-plugin-code-push/events","assignees_url":"https://api.github.com/repos/Microsoft/cordova-plugin-code-push/assignees{/user}","branches_url":"https://api.github.com/repos/Microsoft/cordova-plugin-code-push/branches{/branch}","tags_url":"https://api.github.com/repos/Microsoft/cordova-plugin-code-push/tags","blobs_url":"https://api.github.com/repos/Microsoft/cordova-plugin-code-push/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Microsoft/cordova-plugin-code-push/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Microsoft/cordova-plugin-code-push/git/refs{/sha}","trees_url":"https://api.github.com/repos/Microsoft/cordova-plugin-code-push/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Microsoft/cordova-plugin-code-push/statuses/{sha}","languages_url":"https://api.github.com/repos/Microsoft/cordova-plugin-code-push/languages","stargazers_url":"https://api.github.com/repos/Microsoft/cordova-plugin-code-push/stargazers","contributors_url":"https://api.github.com/repos/Microsoft/cordova-plugin-code-push/contributors","subscribers_url":"https://api.github.com/repos/Microsoft/cordova-plugin-code-push/subscribers","subscription_url":"https://api.github.com/repos/Microsoft/cordova-plugin-code-push/subscription","commits_url":"https://api.github.com/repos/Microsoft/cordova-plugin-code-push/commits{/sha}","git_commits_url":"https://api.github.com/repos/Microsoft/cordova-plugin-code-push/git/commits{/sha}","comments_url":"https://api.github.com/repos/Microsoft/cordova-plugin-code-push/comments{/number}","issue_comment_url":"https://api.github.com/repos/Microsoft/cordova-plugin-code-push/issues/comments{/number}","contents_url":"https://api.github.com/repos/Microsoft/cordova-plugin-code-push/contents/{+path}","compare_url":"https://api.github.com/repos/Microsoft/cordova-plugin-code-push/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Microsoft/cordova-plugin-code-push/merges","archive_url":"https://api.github.com/repos/Microsoft/cordova-plugin-code-push/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Microsoft/cordova-plugin-code-push/downloads","issues_url":"https://api.github.com/repos/Microsoft/cordova-plugin-code-push/issues{/number}","pulls_url":"https://api.github.com/repos/Microsoft/cordova-plugin-code-push/pulls{/number}","milestones_url":"https://api.github.com/repos/Microsoft/cordova-plugin-code-push/milestones{/number}","notifications_url":"https://api.github.com/repos/Microsoft/cordova-plugin-code-push/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Microsoft/cordova-plugin-code-push/labels{/name}","releases_url":"https://api.github.com/repos/Microsoft/cordova-plugin-code-push/releases{/id}","deployments_url":"https://api.github.com/repos/Microsoft/cordova-plugin-code-push/deployments","created_at":"2015-08-19T15:40:12Z","updated_at":"2016-05-16T05:48:56Z","pushed_at":"2016-05-16T17:25:44Z","git_url":"git://github.com/Microsoft/cordova-plugin-code-push.git","ssh_url":"git@github.com:Microsoft/cordova-plugin-code-push.git","clone_url":"https://github.com/Microsoft/cordova-plugin-code-push.git","svn_url":"https://github.com/Microsoft/cordova-plugin-code-push","homepage":"http://codepush.tools","size":923,"stargazers_count":128,"watchers_count":128,"language":"TypeScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":17,"mirror_url":null,"open_issues_count":3,"forks":17,"open_issues":3,"watchers":128,"default_branch":"master"}},"base":{"label":"Microsoft:master","ref":"master","sha":"cb6815c977c7242804979d38b3afcab4b4238698","user":{"login":"Microsoft","id":6154722,"avatar_url":"https://avatars.githubusercontent.com/u/6154722?v=3","gravatar_id":"","url":"https://api.github.com/users/Microsoft","html_url":"https://github.com/Microsoft","followers_url":"https://api.github.com/users/Microsoft/followers","following_url":"https://api.github.com/users/Microsoft/following{/other_user}","gists_url":"https://api.github.com/users/Microsoft/gists{/gist_id}","starred_url":"https://api.github.com/users/Microsoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Microsoft/subscriptions","organizations_url":"https://api.github.com/users/Microsoft/orgs","repos_url":"https://api.github.com/users/Microsoft/repos","events_url":"https://api.github.com/users/Microsoft/events{/privacy}","received_events_url":"https://api.github.com/users/Microsoft/received_events","type":"Organization","site_admin":false},"repo":{"id":41043374,"name":"cordova-plugin-code-push","full_name":"Microsoft/cordova-plugin-code-push","owner":{"login":"Microsoft","id":6154722,"avatar_url":"https://avatars.githubusercontent.com/u/6154722?v=3","gravatar_id":"","url":"https://api.github.com/users/Microsoft","html_url":"https://github.com/Microsoft","followers_url":"https://api.github.com/users/Microsoft/followers","following_url":"https://api.github.com/users/Microsoft/following{/other_user}","gists_url":"https://api.github.com/users/Microsoft/gists{/gist_id}","starred_url":"https://api.github.com/users/Microsoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Microsoft/subscriptions","organizations_url":"https://api.github.com/users/Microsoft/orgs","repos_url":"https://api.github.com/users/Microsoft/repos","events_url":"https://api.github.com/users/Microsoft/events{/privacy}","received_events_url":"https://api.github.com/users/Microsoft/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Microsoft/cordova-plugin-code-push","description":"Cordova plugin for CodePush","fork":false,"url":"https://api.github.com/repos/Microsoft/cordova-plugin-code-push","forks_url":"https://api.github.com/repos/Microsoft/cordova-plugin-code-push/forks","keys_url":"https://api.github.com/repos/Microsoft/cordova-plugin-code-push/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Microsoft/cordova-plugin-code-push/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Microsoft/cordova-plugin-code-push/teams","hooks_url":"https://api.github.com/repos/Microsoft/cordova-plugin-code-push/hooks","issue_events_url":"https://api.github.com/repos/Microsoft/cordova-plugin-code-push/issues/events{/number}","events_url":"https://api.github.com/repos/Microsoft/cordova-plugin-code-push/events","assignees_url":"https://api.github.com/repos/Microsoft/cordova-plugin-code-push/assignees{/user}","branches_url":"https://api.github.com/repos/Microsoft/cordova-plugin-code-push/branches{/branch}","tags_url":"https://api.github.com/repos/Microsoft/cordova-plugin-code-push/tags","blobs_url":"https://api.github.com/repos/Microsoft/cordova-plugin-code-push/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Microsoft/cordova-plugin-code-push/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Microsoft/cordova-plugin-code-push/git/refs{/sha}","trees_url":"https://api.github.com/repos/Microsoft/cordova-plugin-code-push/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Microsoft/cordova-plugin-code-push/statuses/{sha}","languages_url":"https://api.github.com/repos/Microsoft/cordova-plugin-code-push/languages","stargazers_url":"https://api.github.com/repos/Microsoft/cordova-plugin-code-push/stargazers","contributors_url":"https://api.github.com/repos/Microsoft/cordova-plugin-code-push/contributors","subscribers_url":"https://api.github.com/repos/Microsoft/cordova-plugin-code-push/subscribers","subscription_url":"https://api.github.com/repos/Microsoft/cordova-plugin-code-push/subscription","commits_url":"https://api.github.com/repos/Microsoft/cordova-plugin-code-push/commits{/sha}","git_commits_url":"https://api.github.com/repos/Microsoft/cordova-plugin-code-push/git/commits{/sha}","comments_url":"https://api.github.com/repos/Microsoft/cordova-plugin-code-push/comments{/number}","issue_comment_url":"https://api.github.com/repos/Microsoft/cordova-plugin-code-push/issues/comments{/number}","contents_url":"https://api.github.com/repos/Microsoft/cordova-plugin-code-push/contents/{+path}","compare_url":"https://api.github.com/repos/Microsoft/cordova-plugin-code-push/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Microsoft/cordova-plugin-code-push/merges","archive_url":"https://api.github.com/repos/Microsoft/cordova-plugin-code-push/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Microsoft/cordova-plugin-code-push/downloads","issues_url":"https://api.github.com/repos/Microsoft/cordova-plugin-code-push/issues{/number}","pulls_url":"https://api.github.com/repos/Microsoft/cordova-plugin-code-push/pulls{/number}","milestones_url":"https://api.github.com/repos/Microsoft/cordova-plugin-code-push/milestones{/number}","notifications_url":"https://api.github.com/repos/Microsoft/cordova-plugin-code-push/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Microsoft/cordova-plugin-code-push/labels{/name}","releases_url":"https://api.github.com/repos/Microsoft/cordova-plugin-code-push/releases{/id}","deployments_url":"https://api.github.com/repos/Microsoft/cordova-plugin-code-push/deployments","created_at":"2015-08-19T15:40:12Z","updated_at":"2016-05-16T05:48:56Z","pushed_at":"2016-05-16T17:25:44Z","git_url":"git://github.com/Microsoft/cordova-plugin-code-push.git","ssh_url":"git@github.com:Microsoft/cordova-plugin-code-push.git","clone_url":"https://github.com/Microsoft/cordova-plugin-code-push.git","svn_url":"https://github.com/Microsoft/cordova-plugin-code-push","homepage":"http://codepush.tools","size":923,"stargazers_count":128,"watchers_count":128,"language":"TypeScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":17,"mirror_url":null,"open_issues_count":3,"forks":17,"open_issues":3,"watchers":128,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Microsoft/cordova-plugin-code-push/pulls/121"},"html":{"href":"https://github.com/Microsoft/cordova-plugin-code-push/pull/121"},"issue":{"href":"https://api.github.com/repos/Microsoft/cordova-plugin-code-push/issues/121"},"comments":{"href":"https://api.github.com/repos/Microsoft/cordova-plugin-code-push/issues/121/comments"},"review_comments":{"href":"https://api.github.com/repos/Microsoft/cordova-plugin-code-push/pulls/121/comments"},"review_comment":{"href":"https://api.github.com/repos/Microsoft/cordova-plugin-code-push/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Microsoft/cordova-plugin-code-push/pulls/121/commits"},"statuses":{"href":"https://api.github.com/repos/Microsoft/cordova-plugin-code-push/statuses/07d3aced979c8068c8d1e884e09841c6837e6eae"}}}}