{"action":"created","comment":{"url":"https://api.github.com/repos/mongodb/node-mongodb-native/pulls/comments/191586666","pull_request_review_id":124183274,"id":191586666,"diff_hunk":"@@ -0,0 +1,86 @@\n+'use strict';\n+\n+const ReadPreference = require('mongodb-core').ReadPreference;\n+\n+/**\n+ * Ensures provided read preference is properly converted into an object\n+ * @param {(ReadPreference|string|object)} readPreference the user provided read preference\n+ * @return {ReadPreference}\n+ */\n+function convertReadPreference(readPreference) {","path":"lib/operations/db_helpers.js","position":10,"original_position":10,"commit_id":"3ce3585dbcc4c651a9306e9ce55c79d3e548e00b","original_commit_id":"3ce3585dbcc4c651a9306e9ce55c79d3e548e00b","user":{"login":"mbroadst","id":312966,"avatar_url":"https://avatars0.githubusercontent.com/u/312966?v=4","gravatar_id":"","url":"https://api.github.com/users/mbroadst","html_url":"https://github.com/mbroadst","followers_url":"https://api.github.com/users/mbroadst/followers","following_url":"https://api.github.com/users/mbroadst/following{/other_user}","gists_url":"https://api.github.com/users/mbroadst/gists{/gist_id}","starred_url":"https://api.github.com/users/mbroadst/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbroadst/subscriptions","organizations_url":"https://api.github.com/users/mbroadst/orgs","repos_url":"https://api.github.com/users/mbroadst/repos","events_url":"https://api.github.com/users/mbroadst/events{/privacy}","received_events_url":"https://api.github.com/users/mbroadst/received_events","type":"User","site_admin":false},"body":"to me it looks like this isn't an operation but in fact a utility that can be moved to a more central `utils.js` or something similar? It could even be added to the top level `utils.js` imo","created_at":"2018-05-29T21:55:30Z","updated_at":"2018-05-29T21:59:30Z","html_url":"https://github.com/mongodb/node-mongodb-native/pull/1711#discussion_r191586666","pull_request_url":"https://api.github.com/repos/mongodb/node-mongodb-native/pulls/1711","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/mongodb/node-mongodb-native/pulls/comments/191586666"},"html":{"href":"https://github.com/mongodb/node-mongodb-native/pull/1711#discussion_r191586666"},"pull_request":{"href":"https://api.github.com/repos/mongodb/node-mongodb-native/pulls/1711"}}},"pull_request":{"url":"https://api.github.com/repos/mongodb/node-mongodb-native/pulls/1711","id":191261552,"html_url":"https://github.com/mongodb/node-mongodb-native/pull/1711","diff_url":"https://github.com/mongodb/node-mongodb-native/pull/1711.diff","patch_url":"https://github.com/mongodb/node-mongodb-native/pull/1711.patch","issue_url":"https://api.github.com/repos/mongodb/node-mongodb-native/issues/1711","number":1711,"state":"open","locked":false,"title":"refactor(db): move floating functions to their own files","user":{"login":"kvwalker","id":7121013,"avatar_url":"https://avatars3.githubusercontent.com/u/7121013?v=4","gravatar_id":"","url":"https://api.github.com/users/kvwalker","html_url":"https://github.com/kvwalker","followers_url":"https://api.github.com/users/kvwalker/followers","following_url":"https://api.github.com/users/kvwalker/following{/other_user}","gists_url":"https://api.github.com/users/kvwalker/gists{/gist_id}","starred_url":"https://api.github.com/users/kvwalker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kvwalker/subscriptions","organizations_url":"https://api.github.com/users/kvwalker/orgs","repos_url":"https://api.github.com/users/kvwalker/repos","events_url":"https://api.github.com/users/kvwalker/events{/privacy}","received_events_url":"https://api.github.com/users/kvwalker/received_events","type":"User","site_admin":false},"body":"Fixes [NODE-1255](https://jira.mongodb.org/browse/NODE-1255)","created_at":"2018-05-29T20:31:11Z","updated_at":"2018-05-29T21:59:30Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f1b1fe8d29ea6743ff240786c5cc9e7d84573e67","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/mongodb/node-mongodb-native/pulls/1711/commits","review_comments_url":"https://api.github.com/repos/mongodb/node-mongodb-native/pulls/1711/comments","review_comment_url":"https://api.github.com/repos/mongodb/node-mongodb-native/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mongodb/node-mongodb-native/issues/1711/comments","statuses_url":"https://api.github.com/repos/mongodb/node-mongodb-native/statuses/3ce3585dbcc4c651a9306e9ce55c79d3e548e00b","head":{"label":"kvwalker:NODE-1255","ref":"NODE-1255","sha":"3ce3585dbcc4c651a9306e9ce55c79d3e548e00b","user":{"login":"kvwalker","id":7121013,"avatar_url":"https://avatars3.githubusercontent.com/u/7121013?v=4","gravatar_id":"","url":"https://api.github.com/users/kvwalker","html_url":"https://github.com/kvwalker","followers_url":"https://api.github.com/users/kvwalker/followers","following_url":"https://api.github.com/users/kvwalker/following{/other_user}","gists_url":"https://api.github.com/users/kvwalker/gists{/gist_id}","starred_url":"https://api.github.com/users/kvwalker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kvwalker/subscriptions","organizations_url":"https://api.github.com/users/kvwalker/orgs","repos_url":"https://api.github.com/users/kvwalker/repos","events_url":"https://api.github.com/users/kvwalker/events{/privacy}","received_events_url":"https://api.github.com/users/kvwalker/received_events","type":"User","site_admin":false},"repo":{"id":133556011,"name":"node-mongodb-native","full_name":"kvwalker/node-mongodb-native","owner":{"login":"kvwalker","id":7121013,"avatar_url":"https://avatars3.githubusercontent.com/u/7121013?v=4","gravatar_id":"","url":"https://api.github.com/users/kvwalker","html_url":"https://github.com/kvwalker","followers_url":"https://api.github.com/users/kvwalker/followers","following_url":"https://api.github.com/users/kvwalker/following{/other_user}","gists_url":"https://api.github.com/users/kvwalker/gists{/gist_id}","starred_url":"https://api.github.com/users/kvwalker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kvwalker/subscriptions","organizations_url":"https://api.github.com/users/kvwalker/orgs","repos_url":"https://api.github.com/users/kvwalker/repos","events_url":"https://api.github.com/users/kvwalker/events{/privacy}","received_events_url":"https://api.github.com/users/kvwalker/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/kvwalker/node-mongodb-native","description":"Mongo DB Native NodeJS Driver","fork":true,"url":"https://api.github.com/repos/kvwalker/node-mongodb-native","forks_url":"https://api.github.com/repos/kvwalker/node-mongodb-native/forks","keys_url":"https://api.github.com/repos/kvwalker/node-mongodb-native/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kvwalker/node-mongodb-native/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kvwalker/node-mongodb-native/teams","hooks_url":"https://api.github.com/repos/kvwalker/node-mongodb-native/hooks","issue_events_url":"https://api.github.com/repos/kvwalker/node-mongodb-native/issues/events{/number}","events_url":"https://api.github.com/repos/kvwalker/node-mongodb-native/events","assignees_url":"https://api.github.com/repos/kvwalker/node-mongodb-native/assignees{/user}","branches_url":"https://api.github.com/repos/kvwalker/node-mongodb-native/branches{/branch}","tags_url":"https://api.github.com/repos/kvwalker/node-mongodb-native/tags","blobs_url":"https://api.github.com/repos/kvwalker/node-mongodb-native/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kvwalker/node-mongodb-native/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kvwalker/node-mongodb-native/git/refs{/sha}","trees_url":"https://api.github.com/repos/kvwalker/node-mongodb-native/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kvwalker/node-mongodb-native/statuses/{sha}","languages_url":"https://api.github.com/repos/kvwalker/node-mongodb-native/languages","stargazers_url":"https://api.github.com/repos/kvwalker/node-mongodb-native/stargazers","contributors_url":"https://api.github.com/repos/kvwalker/node-mongodb-native/contributors","subscribers_url":"https://api.github.com/repos/kvwalker/node-mongodb-native/subscribers","subscription_url":"https://api.github.com/repos/kvwalker/node-mongodb-native/subscription","commits_url":"https://api.github.com/repos/kvwalker/node-mongodb-native/commits{/sha}","git_commits_url":"https://api.github.com/repos/kvwalker/node-mongodb-native/git/commits{/sha}","comments_url":"https://api.github.com/repos/kvwalker/node-mongodb-native/comments{/number}","issue_comment_url":"https://api.github.com/repos/kvwalker/node-mongodb-native/issues/comments{/number}","contents_url":"https://api.github.com/repos/kvwalker/node-mongodb-native/contents/{+path}","compare_url":"https://api.github.com/repos/kvwalker/node-mongodb-native/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kvwalker/node-mongodb-native/merges","archive_url":"https://api.github.com/repos/kvwalker/node-mongodb-native/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kvwalker/node-mongodb-native/downloads","issues_url":"https://api.github.com/repos/kvwalker/node-mongodb-native/issues{/number}","pulls_url":"https://api.github.com/repos/kvwalker/node-mongodb-native/pulls{/number}","milestones_url":"https://api.github.com/repos/kvwalker/node-mongodb-native/milestones{/number}","notifications_url":"https://api.github.com/repos/kvwalker/node-mongodb-native/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kvwalker/node-mongodb-native/labels{/name}","releases_url":"https://api.github.com/repos/kvwalker/node-mongodb-native/releases{/id}","deployments_url":"https://api.github.com/repos/kvwalker/node-mongodb-native/deployments","created_at":"2018-05-15T18:19:17Z","updated_at":"2018-05-29T17:04:04Z","pushed_at":"2018-05-29T21:30:42Z","git_url":"git://github.com/kvwalker/node-mongodb-native.git","ssh_url":"git@github.com:kvwalker/node-mongodb-native.git","clone_url":"https://github.com/kvwalker/node-mongodb-native.git","svn_url":"https://github.com/kvwalker/node-mongodb-native","homepage":"http://mongodb.github.com/node-mongodb-native/","size":87204,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","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":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"mongodb:master","ref":"master","sha":"fee3db2c53398be4562b54631bb2ab6fb05a3174","user":{"login":"mongodb","id":45120,"avatar_url":"https://avatars1.githubusercontent.com/u/45120?v=4","gravatar_id":"","url":"https://api.github.com/users/mongodb","html_url":"https://github.com/mongodb","followers_url":"https://api.github.com/users/mongodb/followers","following_url":"https://api.github.com/users/mongodb/following{/other_user}","gists_url":"https://api.github.com/users/mongodb/gists{/gist_id}","starred_url":"https://api.github.com/users/mongodb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mongodb/subscriptions","organizations_url":"https://api.github.com/users/mongodb/orgs","repos_url":"https://api.github.com/users/mongodb/repos","events_url":"https://api.github.com/users/mongodb/events{/privacy}","received_events_url":"https://api.github.com/users/mongodb/received_events","type":"Organization","site_admin":false},"repo":{"id":462292,"name":"node-mongodb-native","full_name":"mongodb/node-mongodb-native","owner":{"login":"mongodb","id":45120,"avatar_url":"https://avatars1.githubusercontent.com/u/45120?v=4","gravatar_id":"","url":"https://api.github.com/users/mongodb","html_url":"https://github.com/mongodb","followers_url":"https://api.github.com/users/mongodb/followers","following_url":"https://api.github.com/users/mongodb/following{/other_user}","gists_url":"https://api.github.com/users/mongodb/gists{/gist_id}","starred_url":"https://api.github.com/users/mongodb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mongodb/subscriptions","organizations_url":"https://api.github.com/users/mongodb/orgs","repos_url":"https://api.github.com/users/mongodb/repos","events_url":"https://api.github.com/users/mongodb/events{/privacy}","received_events_url":"https://api.github.com/users/mongodb/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mongodb/node-mongodb-native","description":"Mongo DB Native NodeJS Driver","fork":false,"url":"https://api.github.com/repos/mongodb/node-mongodb-native","forks_url":"https://api.github.com/repos/mongodb/node-mongodb-native/forks","keys_url":"https://api.github.com/repos/mongodb/node-mongodb-native/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mongodb/node-mongodb-native/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mongodb/node-mongodb-native/teams","hooks_url":"https://api.github.com/repos/mongodb/node-mongodb-native/hooks","issue_events_url":"https://api.github.com/repos/mongodb/node-mongodb-native/issues/events{/number}","events_url":"https://api.github.com/repos/mongodb/node-mongodb-native/events","assignees_url":"https://api.github.com/repos/mongodb/node-mongodb-native/assignees{/user}","branches_url":"https://api.github.com/repos/mongodb/node-mongodb-native/branches{/branch}","tags_url":"https://api.github.com/repos/mongodb/node-mongodb-native/tags","blobs_url":"https://api.github.com/repos/mongodb/node-mongodb-native/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mongodb/node-mongodb-native/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mongodb/node-mongodb-native/git/refs{/sha}","trees_url":"https://api.github.com/repos/mongodb/node-mongodb-native/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mongodb/node-mongodb-native/statuses/{sha}","languages_url":"https://api.github.com/repos/mongodb/node-mongodb-native/languages","stargazers_url":"https://api.github.com/repos/mongodb/node-mongodb-native/stargazers","contributors_url":"https://api.github.com/repos/mongodb/node-mongodb-native/contributors","subscribers_url":"https://api.github.com/repos/mongodb/node-mongodb-native/subscribers","subscription_url":"https://api.github.com/repos/mongodb/node-mongodb-native/subscription","commits_url":"https://api.github.com/repos/mongodb/node-mongodb-native/commits{/sha}","git_commits_url":"https://api.github.com/repos/mongodb/node-mongodb-native/git/commits{/sha}","comments_url":"https://api.github.com/repos/mongodb/node-mongodb-native/comments{/number}","issue_comment_url":"https://api.github.com/repos/mongodb/node-mongodb-native/issues/comments{/number}","contents_url":"https://api.github.com/repos/mongodb/node-mongodb-native/contents/{+path}","compare_url":"https://api.github.com/repos/mongodb/node-mongodb-native/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mongodb/node-mongodb-native/merges","archive_url":"https://api.github.com/repos/mongodb/node-mongodb-native/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mongodb/node-mongodb-native/downloads","issues_url":"https://api.github.com/repos/mongodb/node-mongodb-native/issues{/number}","pulls_url":"https://api.github.com/repos/mongodb/node-mongodb-native/pulls{/number}","milestones_url":"https://api.github.com/repos/mongodb/node-mongodb-native/milestones{/number}","notifications_url":"https://api.github.com/repos/mongodb/node-mongodb-native/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mongodb/node-mongodb-native/labels{/name}","releases_url":"https://api.github.com/repos/mongodb/node-mongodb-native/releases{/id}","deployments_url":"https://api.github.com/repos/mongodb/node-mongodb-native/deployments","created_at":"2010-01-07T12:50:50Z","updated_at":"2018-05-29T21:33:18Z","pushed_at":"2018-05-29T21:46:12Z","git_url":"git://github.com/mongodb/node-mongodb-native.git","ssh_url":"git@github.com:mongodb/node-mongodb-native.git","clone_url":"https://github.com/mongodb/node-mongodb-native.git","svn_url":"https://github.com/mongodb/node-mongodb-native","homepage":"http://mongodb.github.com/node-mongodb-native/","size":87468,"stargazers_count":6904,"watchers_count":6904,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":1312,"mirror_url":null,"archived":false,"open_issues_count":16,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":1312,"open_issues":16,"watchers":6904,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mongodb/node-mongodb-native/pulls/1711"},"html":{"href":"https://github.com/mongodb/node-mongodb-native/pull/1711"},"issue":{"href":"https://api.github.com/repos/mongodb/node-mongodb-native/issues/1711"},"comments":{"href":"https://api.github.com/repos/mongodb/node-mongodb-native/issues/1711/comments"},"review_comments":{"href":"https://api.github.com/repos/mongodb/node-mongodb-native/pulls/1711/comments"},"review_comment":{"href":"https://api.github.com/repos/mongodb/node-mongodb-native/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mongodb/node-mongodb-native/pulls/1711/commits"},"statuses":{"href":"https://api.github.com/repos/mongodb/node-mongodb-native/statuses/3ce3585dbcc4c651a9306e9ce55c79d3e548e00b"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"mbroadst"}}