{"action":"created","comment":{"url":"https://api.github.com/repos/lemonde/primus-locky/pulls/comments/103728897","pull_request_review_id":24525199,"id":103728897,"diff_hunk":"@@ -16,19 +18,20 @@ class PrimusLocky {\n     options = options || {};\n     options.locky = options.locky || {};\n \n-    if (! options.locky.client) {\n+    if (! _.get(options, 'locky.client')) {\n       throw new Error('You must define a locky client.');\n     }\n \n-    if (! options.locky.client.ttl) {\n+    if (! _.get(options, 'locky.client.ttl')) {\n       throw new Error('You must specify a TTL for the lock.');\n     }\n \n-    if (! options.locky.unserializeSpark) {\n+    if (! _.get(options, 'locky.unserializeSpark')) {\n       throw new Error('You must implement an unserializeSpark function.');\n     }\n \n-    this.autoLock = typeof options.locky.autoLock === 'undefined' ? true : options.locky.autoLock;\n+    // set the autoLock\n+    this.autoLock = _.get(options, 'locky.autoLock') !== false;","path":"lib/primus-locky.js","position":null,"original_position":27,"commit_id":"d711be5a974d0fa3bbaf571812e53762b930da23","original_commit_id":"6ff93d5c0ebc6360b64845cc002a25ca5ff84bf5","user":{"login":"JBustin","id":2632709,"avatar_url":"https://avatars1.githubusercontent.com/u/2632709?v=3","gravatar_id":"","url":"https://api.github.com/users/JBustin","html_url":"https://github.com/JBustin","followers_url":"https://api.github.com/users/JBustin/followers","following_url":"https://api.github.com/users/JBustin/following{/other_user}","gists_url":"https://api.github.com/users/JBustin/gists{/gist_id}","starred_url":"https://api.github.com/users/JBustin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JBustin/subscriptions","organizations_url":"https://api.github.com/users/JBustin/orgs","repos_url":"https://api.github.com/users/JBustin/repos","events_url":"https://api.github.com/users/JBustin/events{/privacy}","received_events_url":"https://api.github.com/users/JBustin/received_events","type":"User","site_admin":false},"body":"+1 je change","created_at":"2017-03-01T16:38:11Z","updated_at":"2017-03-01T16:38:12Z","html_url":"https://github.com/lemonde/primus-locky/pull/4#discussion_r103728897","pull_request_url":"https://api.github.com/repos/lemonde/primus-locky/pulls/4","_links":{"self":{"href":"https://api.github.com/repos/lemonde/primus-locky/pulls/comments/103728897"},"html":{"href":"https://github.com/lemonde/primus-locky/pull/4#discussion_r103728897"},"pull_request":{"href":"https://api.github.com/repos/lemonde/primus-locky/pulls/4"}}},"pull_request":{"url":"https://api.github.com/repos/lemonde/primus-locky/pulls/4","id":108119591,"html_url":"https://github.com/lemonde/primus-locky/pull/4","diff_url":"https://github.com/lemonde/primus-locky/pull/4.diff","patch_url":"https://github.com/lemonde/primus-locky/pull/4.patch","issue_url":"https://api.github.com/repos/lemonde/primus-locky/issues/4","number":4,"state":"open","locked":false,"title":"refacto: write lib in es6, bump dev dependencies","user":{"login":"JBustin","id":2632709,"avatar_url":"https://avatars1.githubusercontent.com/u/2632709?v=3","gravatar_id":"","url":"https://api.github.com/users/JBustin","html_url":"https://github.com/JBustin","followers_url":"https://api.github.com/users/JBustin/followers","following_url":"https://api.github.com/users/JBustin/following{/other_user}","gists_url":"https://api.github.com/users/JBustin/gists{/gist_id}","starred_url":"https://api.github.com/users/JBustin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JBustin/subscriptions","organizations_url":"https://api.github.com/users/JBustin/orgs","repos_url":"https://api.github.com/users/JBustin/repos","events_url":"https://api.github.com/users/JBustin/events{/privacy}","received_events_url":"https://api.github.com/users/JBustin/received_events","type":"User","site_admin":false},"body":"Migration en es6.\r\nBump des dépendances de dev.\r\nRecette avec redis 3.","created_at":"2017-02-27T14:01:51Z","updated_at":"2017-03-01T16:38:12Z","closed_at":null,"merged_at":null,"merge_commit_sha":"458f8316e9573e3241be8f199b831888cbceb96b","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/lemonde/primus-locky/pulls/4/commits","review_comments_url":"https://api.github.com/repos/lemonde/primus-locky/pulls/4/comments","review_comment_url":"https://api.github.com/repos/lemonde/primus-locky/pulls/comments{/number}","comments_url":"https://api.github.com/repos/lemonde/primus-locky/issues/4/comments","statuses_url":"https://api.github.com/repos/lemonde/primus-locky/statuses/d711be5a974d0fa3bbaf571812e53762b930da23","head":{"label":"lemonde:to-es6","ref":"to-es6","sha":"d711be5a974d0fa3bbaf571812e53762b930da23","user":{"login":"lemonde","id":1830638,"avatar_url":"https://avatars0.githubusercontent.com/u/1830638?v=3","gravatar_id":"","url":"https://api.github.com/users/lemonde","html_url":"https://github.com/lemonde","followers_url":"https://api.github.com/users/lemonde/followers","following_url":"https://api.github.com/users/lemonde/following{/other_user}","gists_url":"https://api.github.com/users/lemonde/gists{/gist_id}","starred_url":"https://api.github.com/users/lemonde/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lemonde/subscriptions","organizations_url":"https://api.github.com/users/lemonde/orgs","repos_url":"https://api.github.com/users/lemonde/repos","events_url":"https://api.github.com/users/lemonde/events{/privacy}","received_events_url":"https://api.github.com/users/lemonde/received_events","type":"Organization","site_admin":false},"repo":{"id":17869506,"name":"primus-locky","full_name":"lemonde/primus-locky","owner":{"login":"lemonde","id":1830638,"avatar_url":"https://avatars0.githubusercontent.com/u/1830638?v=3","gravatar_id":"","url":"https://api.github.com/users/lemonde","html_url":"https://github.com/lemonde","followers_url":"https://api.github.com/users/lemonde/followers","following_url":"https://api.github.com/users/lemonde/following{/other_user}","gists_url":"https://api.github.com/users/lemonde/gists{/gist_id}","starred_url":"https://api.github.com/users/lemonde/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lemonde/subscriptions","organizations_url":"https://api.github.com/users/lemonde/orgs","repos_url":"https://api.github.com/users/lemonde/repos","events_url":"https://api.github.com/users/lemonde/events{/privacy}","received_events_url":"https://api.github.com/users/lemonde/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/lemonde/primus-locky","description":"Primus locky is a primus plugin for locky, it provides a room based locking.","fork":false,"url":"https://api.github.com/repos/lemonde/primus-locky","forks_url":"https://api.github.com/repos/lemonde/primus-locky/forks","keys_url":"https://api.github.com/repos/lemonde/primus-locky/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lemonde/primus-locky/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lemonde/primus-locky/teams","hooks_url":"https://api.github.com/repos/lemonde/primus-locky/hooks","issue_events_url":"https://api.github.com/repos/lemonde/primus-locky/issues/events{/number}","events_url":"https://api.github.com/repos/lemonde/primus-locky/events","assignees_url":"https://api.github.com/repos/lemonde/primus-locky/assignees{/user}","branches_url":"https://api.github.com/repos/lemonde/primus-locky/branches{/branch}","tags_url":"https://api.github.com/repos/lemonde/primus-locky/tags","blobs_url":"https://api.github.com/repos/lemonde/primus-locky/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lemonde/primus-locky/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lemonde/primus-locky/git/refs{/sha}","trees_url":"https://api.github.com/repos/lemonde/primus-locky/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lemonde/primus-locky/statuses/{sha}","languages_url":"https://api.github.com/repos/lemonde/primus-locky/languages","stargazers_url":"https://api.github.com/repos/lemonde/primus-locky/stargazers","contributors_url":"https://api.github.com/repos/lemonde/primus-locky/contributors","subscribers_url":"https://api.github.com/repos/lemonde/primus-locky/subscribers","subscription_url":"https://api.github.com/repos/lemonde/primus-locky/subscription","commits_url":"https://api.github.com/repos/lemonde/primus-locky/commits{/sha}","git_commits_url":"https://api.github.com/repos/lemonde/primus-locky/git/commits{/sha}","comments_url":"https://api.github.com/repos/lemonde/primus-locky/comments{/number}","issue_comment_url":"https://api.github.com/repos/lemonde/primus-locky/issues/comments{/number}","contents_url":"https://api.github.com/repos/lemonde/primus-locky/contents/{+path}","compare_url":"https://api.github.com/repos/lemonde/primus-locky/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lemonde/primus-locky/merges","archive_url":"https://api.github.com/repos/lemonde/primus-locky/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lemonde/primus-locky/downloads","issues_url":"https://api.github.com/repos/lemonde/primus-locky/issues{/number}","pulls_url":"https://api.github.com/repos/lemonde/primus-locky/pulls{/number}","milestones_url":"https://api.github.com/repos/lemonde/primus-locky/milestones{/number}","notifications_url":"https://api.github.com/repos/lemonde/primus-locky/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lemonde/primus-locky/labels{/name}","releases_url":"https://api.github.com/repos/lemonde/primus-locky/releases{/id}","deployments_url":"https://api.github.com/repos/lemonde/primus-locky/deployments","created_at":"2014-03-18T14:46:28Z","updated_at":"2015-10-26T15:42:57Z","pushed_at":"2017-03-01T11:19:54Z","git_url":"git://github.com/lemonde/primus-locky.git","ssh_url":"git@github.com:lemonde/primus-locky.git","clone_url":"https://github.com/lemonde/primus-locky.git","svn_url":"https://github.com/lemonde/primus-locky","homepage":"","size":23,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":3,"forks":0,"open_issues":3,"watchers":0,"default_branch":"master"}},"base":{"label":"lemonde:master","ref":"master","sha":"b914e979f35a3e4b452e059128f0eb68e47a51c3","user":{"login":"lemonde","id":1830638,"avatar_url":"https://avatars0.githubusercontent.com/u/1830638?v=3","gravatar_id":"","url":"https://api.github.com/users/lemonde","html_url":"https://github.com/lemonde","followers_url":"https://api.github.com/users/lemonde/followers","following_url":"https://api.github.com/users/lemonde/following{/other_user}","gists_url":"https://api.github.com/users/lemonde/gists{/gist_id}","starred_url":"https://api.github.com/users/lemonde/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lemonde/subscriptions","organizations_url":"https://api.github.com/users/lemonde/orgs","repos_url":"https://api.github.com/users/lemonde/repos","events_url":"https://api.github.com/users/lemonde/events{/privacy}","received_events_url":"https://api.github.com/users/lemonde/received_events","type":"Organization","site_admin":false},"repo":{"id":17869506,"name":"primus-locky","full_name":"lemonde/primus-locky","owner":{"login":"lemonde","id":1830638,"avatar_url":"https://avatars0.githubusercontent.com/u/1830638?v=3","gravatar_id":"","url":"https://api.github.com/users/lemonde","html_url":"https://github.com/lemonde","followers_url":"https://api.github.com/users/lemonde/followers","following_url":"https://api.github.com/users/lemonde/following{/other_user}","gists_url":"https://api.github.com/users/lemonde/gists{/gist_id}","starred_url":"https://api.github.com/users/lemonde/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lemonde/subscriptions","organizations_url":"https://api.github.com/users/lemonde/orgs","repos_url":"https://api.github.com/users/lemonde/repos","events_url":"https://api.github.com/users/lemonde/events{/privacy}","received_events_url":"https://api.github.com/users/lemonde/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/lemonde/primus-locky","description":"Primus locky is a primus plugin for locky, it provides a room based locking.","fork":false,"url":"https://api.github.com/repos/lemonde/primus-locky","forks_url":"https://api.github.com/repos/lemonde/primus-locky/forks","keys_url":"https://api.github.com/repos/lemonde/primus-locky/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lemonde/primus-locky/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lemonde/primus-locky/teams","hooks_url":"https://api.github.com/repos/lemonde/primus-locky/hooks","issue_events_url":"https://api.github.com/repos/lemonde/primus-locky/issues/events{/number}","events_url":"https://api.github.com/repos/lemonde/primus-locky/events","assignees_url":"https://api.github.com/repos/lemonde/primus-locky/assignees{/user}","branches_url":"https://api.github.com/repos/lemonde/primus-locky/branches{/branch}","tags_url":"https://api.github.com/repos/lemonde/primus-locky/tags","blobs_url":"https://api.github.com/repos/lemonde/primus-locky/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lemonde/primus-locky/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lemonde/primus-locky/git/refs{/sha}","trees_url":"https://api.github.com/repos/lemonde/primus-locky/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lemonde/primus-locky/statuses/{sha}","languages_url":"https://api.github.com/repos/lemonde/primus-locky/languages","stargazers_url":"https://api.github.com/repos/lemonde/primus-locky/stargazers","contributors_url":"https://api.github.com/repos/lemonde/primus-locky/contributors","subscribers_url":"https://api.github.com/repos/lemonde/primus-locky/subscribers","subscription_url":"https://api.github.com/repos/lemonde/primus-locky/subscription","commits_url":"https://api.github.com/repos/lemonde/primus-locky/commits{/sha}","git_commits_url":"https://api.github.com/repos/lemonde/primus-locky/git/commits{/sha}","comments_url":"https://api.github.com/repos/lemonde/primus-locky/comments{/number}","issue_comment_url":"https://api.github.com/repos/lemonde/primus-locky/issues/comments{/number}","contents_url":"https://api.github.com/repos/lemonde/primus-locky/contents/{+path}","compare_url":"https://api.github.com/repos/lemonde/primus-locky/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lemonde/primus-locky/merges","archive_url":"https://api.github.com/repos/lemonde/primus-locky/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lemonde/primus-locky/downloads","issues_url":"https://api.github.com/repos/lemonde/primus-locky/issues{/number}","pulls_url":"https://api.github.com/repos/lemonde/primus-locky/pulls{/number}","milestones_url":"https://api.github.com/repos/lemonde/primus-locky/milestones{/number}","notifications_url":"https://api.github.com/repos/lemonde/primus-locky/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lemonde/primus-locky/labels{/name}","releases_url":"https://api.github.com/repos/lemonde/primus-locky/releases{/id}","deployments_url":"https://api.github.com/repos/lemonde/primus-locky/deployments","created_at":"2014-03-18T14:46:28Z","updated_at":"2015-10-26T15:42:57Z","pushed_at":"2017-03-01T11:19:54Z","git_url":"git://github.com/lemonde/primus-locky.git","ssh_url":"git@github.com:lemonde/primus-locky.git","clone_url":"https://github.com/lemonde/primus-locky.git","svn_url":"https://github.com/lemonde/primus-locky","homepage":"","size":23,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":3,"forks":0,"open_issues":3,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/lemonde/primus-locky/pulls/4"},"html":{"href":"https://github.com/lemonde/primus-locky/pull/4"},"issue":{"href":"https://api.github.com/repos/lemonde/primus-locky/issues/4"},"comments":{"href":"https://api.github.com/repos/lemonde/primus-locky/issues/4/comments"},"review_comments":{"href":"https://api.github.com/repos/lemonde/primus-locky/pulls/4/comments"},"review_comment":{"href":"https://api.github.com/repos/lemonde/primus-locky/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/lemonde/primus-locky/pulls/4/commits"},"statuses":{"href":"https://api.github.com/repos/lemonde/primus-locky/statuses/d711be5a974d0fa3bbaf571812e53762b930da23"}}}}
{"actor":{"display_login":"JBustin"}}