{"action":"created","comment":{"url":"https://api.github.com/repos/ageuk/companion-app/pulls/comments/73350406","id":73350406,"diff_hunk":"@@ -12,13 +14,13 @@ const db = (connection) => {\n   db.getTopicByValue = query('SELECT * FROM topics WHERE value = ?');\n   db.getPrompts = query('SELECT * FROM prompts');\n   db.getPromptByValue = query('SELECT * FROM prompts WHERE value = ?');\n-  db.getActions = query('SELECT * FROM actions');\n+  db.getActions = query('SELECT * FROM actions WHERE locationid = ?');\n   db.getClientActions = query('SELECT * FROM client_actions WHERE clientid = ?');\n   db.deleteClientActions = query('DELETE FROM client_actions WHERE clientid = ?');\n \n   // config needs table, parentKey, dataSet and cb\n   const addSet = (err, rows, config) => {\n-    if (err) throw err;\n+    if (err) config.cb(err, null);","path":"lib/db/data.js","position":25,"original_position":25,"commit_id":"17de687cf75a9ad667b1475eb6060d51ec8dceb0","original_commit_id":"17de687cf75a9ad667b1475eb6060d51ec8dceb0","user":{"login":"rjmk","id":12041390,"avatar_url":"https://avatars.githubusercontent.com/u/12041390?v=3","gravatar_id":"","url":"https://api.github.com/users/rjmk","html_url":"https://github.com/rjmk","followers_url":"https://api.github.com/users/rjmk/followers","following_url":"https://api.github.com/users/rjmk/following{/other_user}","gists_url":"https://api.github.com/users/rjmk/gists{/gist_id}","starred_url":"https://api.github.com/users/rjmk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rjmk/subscriptions","organizations_url":"https://api.github.com/users/rjmk/orgs","repos_url":"https://api.github.com/users/rjmk/repos","events_url":"https://api.github.com/users/rjmk/events{/privacy}","received_events_url":"https://api.github.com/users/rjmk/received_events","type":"User","site_admin":false},"body":"It *should* happen in `addPromptSet`. This was one comment to cover all of these examples (which perhaps wasn't very clear). A quick pass over this diff suggests lines 23, 33, 34, 47, 48, 76, 77, 80, 81, 84, 85, 99, 100, 103, 104, 122, 123, 126 and 137 all should have a `return`","created_at":"2016-08-03T14:41:21Z","updated_at":"2016-08-03T14:41:21Z","html_url":"https://github.com/ageuk/companion-app/pull/110#discussion_r73350406","pull_request_url":"https://api.github.com/repos/ageuk/companion-app/pulls/110","_links":{"self":{"href":"https://api.github.com/repos/ageuk/companion-app/pulls/comments/73350406"},"html":{"href":"https://github.com/ageuk/companion-app/pull/110#discussion_r73350406"},"pull_request":{"href":"https://api.github.com/repos/ageuk/companion-app/pulls/110"}}},"pull_request":{"url":"https://api.github.com/repos/ageuk/companion-app/pulls/110","id":79873434,"html_url":"https://github.com/ageuk/companion-app/pull/110","diff_url":"https://github.com/ageuk/companion-app/pull/110.diff","patch_url":"https://github.com/ageuk/companion-app/pull/110.patch","issue_url":"https://api.github.com/repos/ageuk/companion-app/issues/110","number":110,"state":"open","locked":false,"title":"Localising actions and companions","user":{"login":"katbow","id":1287388,"avatar_url":"https://avatars.githubusercontent.com/u/1287388?v=3","gravatar_id":"","url":"https://api.github.com/users/katbow","html_url":"https://github.com/katbow","followers_url":"https://api.github.com/users/katbow/followers","following_url":"https://api.github.com/users/katbow/following{/other_user}","gists_url":"https://api.github.com/users/katbow/gists{/gist_id}","starred_url":"https://api.github.com/users/katbow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/katbow/subscriptions","organizations_url":"https://api.github.com/users/katbow/orgs","repos_url":"https://api.github.com/users/katbow/repos","events_url":"https://api.github.com/users/katbow/events{/privacy}","received_events_url":"https://api.github.com/users/katbow/received_events","type":"User","site_admin":false},"body":"(Very tempting to call this PR 'Location, location, location)\r\n\r\nAdds functionality for adding to location table, and adjusts functions for companion and actions tables to add in field for locationid.","created_at":"2016-08-03T09:21:27Z","updated_at":"2016-08-03T14:41:21Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2565636684bceb49701475c51d44ee961e6b7a3b","assignee":{"login":"katbow","id":1287388,"avatar_url":"https://avatars.githubusercontent.com/u/1287388?v=3","gravatar_id":"","url":"https://api.github.com/users/katbow","html_url":"https://github.com/katbow","followers_url":"https://api.github.com/users/katbow/followers","following_url":"https://api.github.com/users/katbow/following{/other_user}","gists_url":"https://api.github.com/users/katbow/gists{/gist_id}","starred_url":"https://api.github.com/users/katbow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/katbow/subscriptions","organizations_url":"https://api.github.com/users/katbow/orgs","repos_url":"https://api.github.com/users/katbow/repos","events_url":"https://api.github.com/users/katbow/events{/privacy}","received_events_url":"https://api.github.com/users/katbow/received_events","type":"User","site_admin":false},"assignees":[{"login":"katbow","id":1287388,"avatar_url":"https://avatars.githubusercontent.com/u/1287388?v=3","gravatar_id":"","url":"https://api.github.com/users/katbow","html_url":"https://github.com/katbow","followers_url":"https://api.github.com/users/katbow/followers","following_url":"https://api.github.com/users/katbow/following{/other_user}","gists_url":"https://api.github.com/users/katbow/gists{/gist_id}","starred_url":"https://api.github.com/users/katbow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/katbow/subscriptions","organizations_url":"https://api.github.com/users/katbow/orgs","repos_url":"https://api.github.com/users/katbow/repos","events_url":"https://api.github.com/users/katbow/events{/privacy}","received_events_url":"https://api.github.com/users/katbow/received_events","type":"User","site_admin":false},{"login":"andrewMacmurray","id":14013616,"avatar_url":"https://avatars.githubusercontent.com/u/14013616?v=3","gravatar_id":"","url":"https://api.github.com/users/andrewMacmurray","html_url":"https://github.com/andrewMacmurray","followers_url":"https://api.github.com/users/andrewMacmurray/followers","following_url":"https://api.github.com/users/andrewMacmurray/following{/other_user}","gists_url":"https://api.github.com/users/andrewMacmurray/gists{/gist_id}","starred_url":"https://api.github.com/users/andrewMacmurray/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrewMacmurray/subscriptions","organizations_url":"https://api.github.com/users/andrewMacmurray/orgs","repos_url":"https://api.github.com/users/andrewMacmurray/repos","events_url":"https://api.github.com/users/andrewMacmurray/events{/privacy}","received_events_url":"https://api.github.com/users/andrewMacmurray/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/ageuk/companion-app/pulls/110/commits","review_comments_url":"https://api.github.com/repos/ageuk/companion-app/pulls/110/comments","review_comment_url":"https://api.github.com/repos/ageuk/companion-app/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ageuk/companion-app/issues/110/comments","statuses_url":"https://api.github.com/repos/ageuk/companion-app/statuses/17de687cf75a9ad667b1475eb6060d51ec8dceb0","head":{"label":"ageuk:location","ref":"location","sha":"17de687cf75a9ad667b1475eb6060d51ec8dceb0","user":{"login":"ageuk","id":20108238,"avatar_url":"https://avatars.githubusercontent.com/u/20108238?v=3","gravatar_id":"","url":"https://api.github.com/users/ageuk","html_url":"https://github.com/ageuk","followers_url":"https://api.github.com/users/ageuk/followers","following_url":"https://api.github.com/users/ageuk/following{/other_user}","gists_url":"https://api.github.com/users/ageuk/gists{/gist_id}","starred_url":"https://api.github.com/users/ageuk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ageuk/subscriptions","organizations_url":"https://api.github.com/users/ageuk/orgs","repos_url":"https://api.github.com/users/ageuk/repos","events_url":"https://api.github.com/users/ageuk/events{/privacy}","received_events_url":"https://api.github.com/users/ageuk/received_events","type":"Organization","site_admin":false},"repo":{"id":61796793,"name":"companion-app","full_name":"ageuk/companion-app","owner":{"login":"ageuk","id":20108238,"avatar_url":"https://avatars.githubusercontent.com/u/20108238?v=3","gravatar_id":"","url":"https://api.github.com/users/ageuk","html_url":"https://github.com/ageuk","followers_url":"https://api.github.com/users/ageuk/followers","following_url":"https://api.github.com/users/ageuk/following{/other_user}","gists_url":"https://api.github.com/users/ageuk/gists{/gist_id}","starred_url":"https://api.github.com/users/ageuk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ageuk/subscriptions","organizations_url":"https://api.github.com/users/ageuk/orgs","repos_url":"https://api.github.com/users/ageuk/repos","events_url":"https://api.github.com/users/ageuk/events{/privacy}","received_events_url":"https://api.github.com/users/ageuk/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ageuk/companion-app","description":"An application for guided conversation between a companion and a client.","fork":false,"url":"https://api.github.com/repos/ageuk/companion-app","forks_url":"https://api.github.com/repos/ageuk/companion-app/forks","keys_url":"https://api.github.com/repos/ageuk/companion-app/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ageuk/companion-app/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ageuk/companion-app/teams","hooks_url":"https://api.github.com/repos/ageuk/companion-app/hooks","issue_events_url":"https://api.github.com/repos/ageuk/companion-app/issues/events{/number}","events_url":"https://api.github.com/repos/ageuk/companion-app/events","assignees_url":"https://api.github.com/repos/ageuk/companion-app/assignees{/user}","branches_url":"https://api.github.com/repos/ageuk/companion-app/branches{/branch}","tags_url":"https://api.github.com/repos/ageuk/companion-app/tags","blobs_url":"https://api.github.com/repos/ageuk/companion-app/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ageuk/companion-app/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ageuk/companion-app/git/refs{/sha}","trees_url":"https://api.github.com/repos/ageuk/companion-app/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ageuk/companion-app/statuses/{sha}","languages_url":"https://api.github.com/repos/ageuk/companion-app/languages","stargazers_url":"https://api.github.com/repos/ageuk/companion-app/stargazers","contributors_url":"https://api.github.com/repos/ageuk/companion-app/contributors","subscribers_url":"https://api.github.com/repos/ageuk/companion-app/subscribers","subscription_url":"https://api.github.com/repos/ageuk/companion-app/subscription","commits_url":"https://api.github.com/repos/ageuk/companion-app/commits{/sha}","git_commits_url":"https://api.github.com/repos/ageuk/companion-app/git/commits{/sha}","comments_url":"https://api.github.com/repos/ageuk/companion-app/comments{/number}","issue_comment_url":"https://api.github.com/repos/ageuk/companion-app/issues/comments{/number}","contents_url":"https://api.github.com/repos/ageuk/companion-app/contents/{+path}","compare_url":"https://api.github.com/repos/ageuk/companion-app/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ageuk/companion-app/merges","archive_url":"https://api.github.com/repos/ageuk/companion-app/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ageuk/companion-app/downloads","issues_url":"https://api.github.com/repos/ageuk/companion-app/issues{/number}","pulls_url":"https://api.github.com/repos/ageuk/companion-app/pulls{/number}","milestones_url":"https://api.github.com/repos/ageuk/companion-app/milestones{/number}","notifications_url":"https://api.github.com/repos/ageuk/companion-app/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ageuk/companion-app/labels{/name}","releases_url":"https://api.github.com/repos/ageuk/companion-app/releases{/id}","deployments_url":"https://api.github.com/repos/ageuk/companion-app/deployments","created_at":"2016-06-23T10:31:42Z","updated_at":"2016-07-12T12:03:13Z","pushed_at":"2016-08-03T14:10:29Z","git_url":"git://github.com/ageuk/companion-app.git","ssh_url":"git@github.com:ageuk/companion-app.git","clone_url":"https://github.com/ageuk/companion-app.git","svn_url":"https://github.com/ageuk/companion-app","homepage":"http://ageuk-companion-app.herokuapp.com/","size":495,"stargazers_count":4,"watchers_count":4,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":32,"forks":0,"open_issues":32,"watchers":4,"default_branch":"master"}},"base":{"label":"ageuk:master","ref":"master","sha":"8802a47d6714ee5d8c43e6a9c010bbfde5ed5dd2","user":{"login":"ageuk","id":20108238,"avatar_url":"https://avatars.githubusercontent.com/u/20108238?v=3","gravatar_id":"","url":"https://api.github.com/users/ageuk","html_url":"https://github.com/ageuk","followers_url":"https://api.github.com/users/ageuk/followers","following_url":"https://api.github.com/users/ageuk/following{/other_user}","gists_url":"https://api.github.com/users/ageuk/gists{/gist_id}","starred_url":"https://api.github.com/users/ageuk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ageuk/subscriptions","organizations_url":"https://api.github.com/users/ageuk/orgs","repos_url":"https://api.github.com/users/ageuk/repos","events_url":"https://api.github.com/users/ageuk/events{/privacy}","received_events_url":"https://api.github.com/users/ageuk/received_events","type":"Organization","site_admin":false},"repo":{"id":61796793,"name":"companion-app","full_name":"ageuk/companion-app","owner":{"login":"ageuk","id":20108238,"avatar_url":"https://avatars.githubusercontent.com/u/20108238?v=3","gravatar_id":"","url":"https://api.github.com/users/ageuk","html_url":"https://github.com/ageuk","followers_url":"https://api.github.com/users/ageuk/followers","following_url":"https://api.github.com/users/ageuk/following{/other_user}","gists_url":"https://api.github.com/users/ageuk/gists{/gist_id}","starred_url":"https://api.github.com/users/ageuk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ageuk/subscriptions","organizations_url":"https://api.github.com/users/ageuk/orgs","repos_url":"https://api.github.com/users/ageuk/repos","events_url":"https://api.github.com/users/ageuk/events{/privacy}","received_events_url":"https://api.github.com/users/ageuk/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ageuk/companion-app","description":"An application for guided conversation between a companion and a client.","fork":false,"url":"https://api.github.com/repos/ageuk/companion-app","forks_url":"https://api.github.com/repos/ageuk/companion-app/forks","keys_url":"https://api.github.com/repos/ageuk/companion-app/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ageuk/companion-app/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ageuk/companion-app/teams","hooks_url":"https://api.github.com/repos/ageuk/companion-app/hooks","issue_events_url":"https://api.github.com/repos/ageuk/companion-app/issues/events{/number}","events_url":"https://api.github.com/repos/ageuk/companion-app/events","assignees_url":"https://api.github.com/repos/ageuk/companion-app/assignees{/user}","branches_url":"https://api.github.com/repos/ageuk/companion-app/branches{/branch}","tags_url":"https://api.github.com/repos/ageuk/companion-app/tags","blobs_url":"https://api.github.com/repos/ageuk/companion-app/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ageuk/companion-app/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ageuk/companion-app/git/refs{/sha}","trees_url":"https://api.github.com/repos/ageuk/companion-app/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ageuk/companion-app/statuses/{sha}","languages_url":"https://api.github.com/repos/ageuk/companion-app/languages","stargazers_url":"https://api.github.com/repos/ageuk/companion-app/stargazers","contributors_url":"https://api.github.com/repos/ageuk/companion-app/contributors","subscribers_url":"https://api.github.com/repos/ageuk/companion-app/subscribers","subscription_url":"https://api.github.com/repos/ageuk/companion-app/subscription","commits_url":"https://api.github.com/repos/ageuk/companion-app/commits{/sha}","git_commits_url":"https://api.github.com/repos/ageuk/companion-app/git/commits{/sha}","comments_url":"https://api.github.com/repos/ageuk/companion-app/comments{/number}","issue_comment_url":"https://api.github.com/repos/ageuk/companion-app/issues/comments{/number}","contents_url":"https://api.github.com/repos/ageuk/companion-app/contents/{+path}","compare_url":"https://api.github.com/repos/ageuk/companion-app/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ageuk/companion-app/merges","archive_url":"https://api.github.com/repos/ageuk/companion-app/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ageuk/companion-app/downloads","issues_url":"https://api.github.com/repos/ageuk/companion-app/issues{/number}","pulls_url":"https://api.github.com/repos/ageuk/companion-app/pulls{/number}","milestones_url":"https://api.github.com/repos/ageuk/companion-app/milestones{/number}","notifications_url":"https://api.github.com/repos/ageuk/companion-app/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ageuk/companion-app/labels{/name}","releases_url":"https://api.github.com/repos/ageuk/companion-app/releases{/id}","deployments_url":"https://api.github.com/repos/ageuk/companion-app/deployments","created_at":"2016-06-23T10:31:42Z","updated_at":"2016-07-12T12:03:13Z","pushed_at":"2016-08-03T14:10:29Z","git_url":"git://github.com/ageuk/companion-app.git","ssh_url":"git@github.com:ageuk/companion-app.git","clone_url":"https://github.com/ageuk/companion-app.git","svn_url":"https://github.com/ageuk/companion-app","homepage":"http://ageuk-companion-app.herokuapp.com/","size":495,"stargazers_count":4,"watchers_count":4,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":32,"forks":0,"open_issues":32,"watchers":4,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ageuk/companion-app/pulls/110"},"html":{"href":"https://github.com/ageuk/companion-app/pull/110"},"issue":{"href":"https://api.github.com/repos/ageuk/companion-app/issues/110"},"comments":{"href":"https://api.github.com/repos/ageuk/companion-app/issues/110/comments"},"review_comments":{"href":"https://api.github.com/repos/ageuk/companion-app/pulls/110/comments"},"review_comment":{"href":"https://api.github.com/repos/ageuk/companion-app/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ageuk/companion-app/pulls/110/commits"},"statuses":{"href":"https://api.github.com/repos/ageuk/companion-app/statuses/17de687cf75a9ad667b1475eb6060d51ec8dceb0"}}}}
{"actor":{"display_login":"rjmk"}}