{"action":"created","comment":{"url":"https://api.github.com/repos/LoopKit/Loop/pulls/comments/154825308","pull_request_review_id":81045842,"id":154825308,"diff_hunk":"@@ -205,11 +205,24 @@ class StatusViewController: UIViewController, NCWidgetProviding {\n                 if let eventualGlucose = predictedGlucose.last {\n                     let formatter = NumberFormatter.glucoseFormatter(for: eventualGlucose.unit)\n \n+                    var activeInsulinString = \"--\"\n+                    if let activeInsulin = context.activeInsulin {\n+                        // If the returned value doesn't indicate an error,\n+                        // assign it to the label:\n+                        if activeInsulin.error == \"\" {\n+                            activeInsulinString = String(format: \"%.1f\", activeInsulin.value)\n+                        } else {\n+                            // This will be ugly but maybe (?) informative: \n+                            activeInsulinString = activeInsulin.error","path":"Loop Status Extension/StatusViewController.swift","position":12,"original_position":12,"commit_id":"bfa4e37cd9abdb4fdb9e24b152af7e80ee1122bf","original_commit_id":"bfa4e37cd9abdb4fdb9e24b152af7e80ee1122bf","user":{"login":"bharat","id":54570,"avatar_url":"https://avatars0.githubusercontent.com/u/54570?v=4","gravatar_id":"","url":"https://api.github.com/users/bharat","html_url":"https://github.com/bharat","followers_url":"https://api.github.com/users/bharat/followers","following_url":"https://api.github.com/users/bharat/following{/other_user}","gists_url":"https://api.github.com/users/bharat/gists{/gist_id}","starred_url":"https://api.github.com/users/bharat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bharat/subscriptions","organizations_url":"https://api.github.com/users/bharat/orgs","repos_url":"https://api.github.com/users/bharat/repos","events_url":"https://api.github.com/users/bharat/events{/privacy}","received_events_url":"https://api.github.com/users/bharat/received_events","type":"User","site_admin":false},"body":"what will this look like? I haven't looked up what doseStore errors look like, but we don't want it to be misleading (ie, a small integer value here could be seriously confusing or potentially very harmful). I think I'd want to see us put in a non-numeric value of known size, like \"??\" or \"ERR\"\r\n","created_at":"2017-12-05T01:31:02Z","updated_at":"2017-12-05T01:39:53Z","html_url":"https://github.com/LoopKit/Loop/pull/635#discussion_r154825308","pull_request_url":"https://api.github.com/repos/LoopKit/Loop/pulls/635","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/LoopKit/Loop/pulls/comments/154825308"},"html":{"href":"https://github.com/LoopKit/Loop/pull/635#discussion_r154825308"},"pull_request":{"href":"https://api.github.com/repos/LoopKit/Loop/pulls/635"}}},"pull_request":{"url":"https://api.github.com/repos/LoopKit/Loop/pulls/635","id":156040381,"html_url":"https://github.com/LoopKit/Loop/pull/635","diff_url":"https://github.com/LoopKit/Loop/pull/635.diff","patch_url":"https://github.com/LoopKit/Loop/pull/635.patch","issue_url":"https://api.github.com/repos/LoopKit/Loop/issues/635","number":635,"state":"open","locked":false,"title":"Add active insulin (IOB) value in Today widget","user":{"login":"elnjensen","id":2545845,"avatar_url":"https://avatars3.githubusercontent.com/u/2545845?v=4","gravatar_id":"","url":"https://api.github.com/users/elnjensen","html_url":"https://github.com/elnjensen","followers_url":"https://api.github.com/users/elnjensen/followers","following_url":"https://api.github.com/users/elnjensen/following{/other_user}","gists_url":"https://api.github.com/users/elnjensen/gists{/gist_id}","starred_url":"https://api.github.com/users/elnjensen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elnjensen/subscriptions","organizations_url":"https://api.github.com/users/elnjensen/orgs","repos_url":"https://api.github.com/users/elnjensen/repos","events_url":"https://api.github.com/users/elnjensen/events{/privacy}","received_events_url":"https://api.github.com/users/elnjensen/received_events","type":"User","site_admin":false},"body":"","created_at":"2017-12-03T01:16:49Z","updated_at":"2017-12-05T01:39:53Z","closed_at":null,"merged_at":null,"merge_commit_sha":"89b3870a7f167d84098e6ebb43fccfb75f238970","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/LoopKit/Loop/pulls/635/commits","review_comments_url":"https://api.github.com/repos/LoopKit/Loop/pulls/635/comments","review_comment_url":"https://api.github.com/repos/LoopKit/Loop/pulls/comments{/number}","comments_url":"https://api.github.com/repos/LoopKit/Loop/issues/635/comments","statuses_url":"https://api.github.com/repos/LoopKit/Loop/statuses/bfa4e37cd9abdb4fdb9e24b152af7e80ee1122bf","head":{"label":"elnjensen:IOB-in-widget","ref":"IOB-in-widget","sha":"bfa4e37cd9abdb4fdb9e24b152af7e80ee1122bf","user":{"login":"elnjensen","id":2545845,"avatar_url":"https://avatars3.githubusercontent.com/u/2545845?v=4","gravatar_id":"","url":"https://api.github.com/users/elnjensen","html_url":"https://github.com/elnjensen","followers_url":"https://api.github.com/users/elnjensen/followers","following_url":"https://api.github.com/users/elnjensen/following{/other_user}","gists_url":"https://api.github.com/users/elnjensen/gists{/gist_id}","starred_url":"https://api.github.com/users/elnjensen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elnjensen/subscriptions","organizations_url":"https://api.github.com/users/elnjensen/orgs","repos_url":"https://api.github.com/users/elnjensen/repos","events_url":"https://api.github.com/users/elnjensen/events{/privacy}","received_events_url":"https://api.github.com/users/elnjensen/received_events","type":"User","site_admin":false},"repo":{"id":70355618,"name":"Loop","full_name":"elnjensen/Loop","owner":{"login":"elnjensen","id":2545845,"avatar_url":"https://avatars3.githubusercontent.com/u/2545845?v=4","gravatar_id":"","url":"https://api.github.com/users/elnjensen","html_url":"https://github.com/elnjensen","followers_url":"https://api.github.com/users/elnjensen/followers","following_url":"https://api.github.com/users/elnjensen/following{/other_user}","gists_url":"https://api.github.com/users/elnjensen/gists{/gist_id}","starred_url":"https://api.github.com/users/elnjensen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elnjensen/subscriptions","organizations_url":"https://api.github.com/users/elnjensen/orgs","repos_url":"https://api.github.com/users/elnjensen/repos","events_url":"https://api.github.com/users/elnjensen/events{/privacy}","received_events_url":"https://api.github.com/users/elnjensen/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/elnjensen/Loop","description":"A closed-loop insulin delivery app for iOS, built on LoopKit","fork":true,"url":"https://api.github.com/repos/elnjensen/Loop","forks_url":"https://api.github.com/repos/elnjensen/Loop/forks","keys_url":"https://api.github.com/repos/elnjensen/Loop/keys{/key_id}","collaborators_url":"https://api.github.com/repos/elnjensen/Loop/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/elnjensen/Loop/teams","hooks_url":"https://api.github.com/repos/elnjensen/Loop/hooks","issue_events_url":"https://api.github.com/repos/elnjensen/Loop/issues/events{/number}","events_url":"https://api.github.com/repos/elnjensen/Loop/events","assignees_url":"https://api.github.com/repos/elnjensen/Loop/assignees{/user}","branches_url":"https://api.github.com/repos/elnjensen/Loop/branches{/branch}","tags_url":"https://api.github.com/repos/elnjensen/Loop/tags","blobs_url":"https://api.github.com/repos/elnjensen/Loop/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/elnjensen/Loop/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/elnjensen/Loop/git/refs{/sha}","trees_url":"https://api.github.com/repos/elnjensen/Loop/git/trees{/sha}","statuses_url":"https://api.github.com/repos/elnjensen/Loop/statuses/{sha}","languages_url":"https://api.github.com/repos/elnjensen/Loop/languages","stargazers_url":"https://api.github.com/repos/elnjensen/Loop/stargazers","contributors_url":"https://api.github.com/repos/elnjensen/Loop/contributors","subscribers_url":"https://api.github.com/repos/elnjensen/Loop/subscribers","subscription_url":"https://api.github.com/repos/elnjensen/Loop/subscription","commits_url":"https://api.github.com/repos/elnjensen/Loop/commits{/sha}","git_commits_url":"https://api.github.com/repos/elnjensen/Loop/git/commits{/sha}","comments_url":"https://api.github.com/repos/elnjensen/Loop/comments{/number}","issue_comment_url":"https://api.github.com/repos/elnjensen/Loop/issues/comments{/number}","contents_url":"https://api.github.com/repos/elnjensen/Loop/contents/{+path}","compare_url":"https://api.github.com/repos/elnjensen/Loop/compare/{base}...{head}","merges_url":"https://api.github.com/repos/elnjensen/Loop/merges","archive_url":"https://api.github.com/repos/elnjensen/Loop/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/elnjensen/Loop/downloads","issues_url":"https://api.github.com/repos/elnjensen/Loop/issues{/number}","pulls_url":"https://api.github.com/repos/elnjensen/Loop/pulls{/number}","milestones_url":"https://api.github.com/repos/elnjensen/Loop/milestones{/number}","notifications_url":"https://api.github.com/repos/elnjensen/Loop/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/elnjensen/Loop/labels{/name}","releases_url":"https://api.github.com/repos/elnjensen/Loop/releases{/id}","deployments_url":"https://api.github.com/repos/elnjensen/Loop/deployments","created_at":"2016-10-08T20:25:26Z","updated_at":"2016-10-08T20:25:27Z","pushed_at":"2017-11-29T03:30:38Z","git_url":"git://github.com/elnjensen/Loop.git","ssh_url":"git@github.com:elnjensen/Loop.git","clone_url":"https://github.com/elnjensen/Loop.git","svn_url":"https://github.com/elnjensen/Loop","homepage":"","size":470165,"stargazers_count":0,"watchers_count":0,"language":"Swift","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"LoopKit:dev","ref":"dev","sha":"bb83268dc039574eb242d0e7c1a7889dd6977ea0","user":{"login":"LoopKit","id":21267095,"avatar_url":"https://avatars1.githubusercontent.com/u/21267095?v=4","gravatar_id":"","url":"https://api.github.com/users/LoopKit","html_url":"https://github.com/LoopKit","followers_url":"https://api.github.com/users/LoopKit/followers","following_url":"https://api.github.com/users/LoopKit/following{/other_user}","gists_url":"https://api.github.com/users/LoopKit/gists{/gist_id}","starred_url":"https://api.github.com/users/LoopKit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LoopKit/subscriptions","organizations_url":"https://api.github.com/users/LoopKit/orgs","repos_url":"https://api.github.com/users/LoopKit/repos","events_url":"https://api.github.com/users/LoopKit/events{/privacy}","received_events_url":"https://api.github.com/users/LoopKit/received_events","type":"Organization","site_admin":false},"repo":{"id":59537417,"name":"Loop","full_name":"LoopKit/Loop","owner":{"login":"LoopKit","id":21267095,"avatar_url":"https://avatars1.githubusercontent.com/u/21267095?v=4","gravatar_id":"","url":"https://api.github.com/users/LoopKit","html_url":"https://github.com/LoopKit","followers_url":"https://api.github.com/users/LoopKit/followers","following_url":"https://api.github.com/users/LoopKit/following{/other_user}","gists_url":"https://api.github.com/users/LoopKit/gists{/gist_id}","starred_url":"https://api.github.com/users/LoopKit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LoopKit/subscriptions","organizations_url":"https://api.github.com/users/LoopKit/orgs","repos_url":"https://api.github.com/users/LoopKit/repos","events_url":"https://api.github.com/users/LoopKit/events{/privacy}","received_events_url":"https://api.github.com/users/LoopKit/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/LoopKit/Loop","description":"An automated insulin delivery app template for iOS, built on LoopKit","fork":false,"url":"https://api.github.com/repos/LoopKit/Loop","forks_url":"https://api.github.com/repos/LoopKit/Loop/forks","keys_url":"https://api.github.com/repos/LoopKit/Loop/keys{/key_id}","collaborators_url":"https://api.github.com/repos/LoopKit/Loop/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/LoopKit/Loop/teams","hooks_url":"https://api.github.com/repos/LoopKit/Loop/hooks","issue_events_url":"https://api.github.com/repos/LoopKit/Loop/issues/events{/number}","events_url":"https://api.github.com/repos/LoopKit/Loop/events","assignees_url":"https://api.github.com/repos/LoopKit/Loop/assignees{/user}","branches_url":"https://api.github.com/repos/LoopKit/Loop/branches{/branch}","tags_url":"https://api.github.com/repos/LoopKit/Loop/tags","blobs_url":"https://api.github.com/repos/LoopKit/Loop/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/LoopKit/Loop/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/LoopKit/Loop/git/refs{/sha}","trees_url":"https://api.github.com/repos/LoopKit/Loop/git/trees{/sha}","statuses_url":"https://api.github.com/repos/LoopKit/Loop/statuses/{sha}","languages_url":"https://api.github.com/repos/LoopKit/Loop/languages","stargazers_url":"https://api.github.com/repos/LoopKit/Loop/stargazers","contributors_url":"https://api.github.com/repos/LoopKit/Loop/contributors","subscribers_url":"https://api.github.com/repos/LoopKit/Loop/subscribers","subscription_url":"https://api.github.com/repos/LoopKit/Loop/subscription","commits_url":"https://api.github.com/repos/LoopKit/Loop/commits{/sha}","git_commits_url":"https://api.github.com/repos/LoopKit/Loop/git/commits{/sha}","comments_url":"https://api.github.com/repos/LoopKit/Loop/comments{/number}","issue_comment_url":"https://api.github.com/repos/LoopKit/Loop/issues/comments{/number}","contents_url":"https://api.github.com/repos/LoopKit/Loop/contents/{+path}","compare_url":"https://api.github.com/repos/LoopKit/Loop/compare/{base}...{head}","merges_url":"https://api.github.com/repos/LoopKit/Loop/merges","archive_url":"https://api.github.com/repos/LoopKit/Loop/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/LoopKit/Loop/downloads","issues_url":"https://api.github.com/repos/LoopKit/Loop/issues{/number}","pulls_url":"https://api.github.com/repos/LoopKit/Loop/pulls{/number}","milestones_url":"https://api.github.com/repos/LoopKit/Loop/milestones{/number}","notifications_url":"https://api.github.com/repos/LoopKit/Loop/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/LoopKit/Loop/labels{/name}","releases_url":"https://api.github.com/repos/LoopKit/Loop/releases{/id}","deployments_url":"https://api.github.com/repos/LoopKit/Loop/deployments","created_at":"2016-05-24T03:26:56Z","updated_at":"2017-12-03T02:49:46Z","pushed_at":"2017-12-03T01:16:50Z","git_url":"git://github.com/LoopKit/Loop.git","ssh_url":"git@github.com:LoopKit/Loop.git","clone_url":"https://github.com/LoopKit/Loop.git","svn_url":"https://github.com/LoopKit/Loop","homepage":"","size":469860,"stargazers_count":123,"watchers_count":123,"language":"Swift","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":259,"mirror_url":null,"archived":false,"open_issues_count":117,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":259,"open_issues":117,"watchers":123,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/LoopKit/Loop/pulls/635"},"html":{"href":"https://github.com/LoopKit/Loop/pull/635"},"issue":{"href":"https://api.github.com/repos/LoopKit/Loop/issues/635"},"comments":{"href":"https://api.github.com/repos/LoopKit/Loop/issues/635/comments"},"review_comments":{"href":"https://api.github.com/repos/LoopKit/Loop/pulls/635/comments"},"review_comment":{"href":"https://api.github.com/repos/LoopKit/Loop/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/LoopKit/Loop/pulls/635/commits"},"statuses":{"href":"https://api.github.com/repos/LoopKit/Loop/statuses/bfa4e37cd9abdb4fdb9e24b152af7e80ee1122bf"}},"author_association":"NONE"}}
{"actor":{"display_login":"bharat"}}