{"action":"created","comment":{"url":"https://api.github.com/repos/apiaryio/hubot-pager-me/pulls/comments/48599266","id":48599266,"diff_hunk":"@@ -808,6 +808,8 @@ module.exports = (robot) ->\n             ]\n           return cb(users, schedule)\n         cb(json.entries[0].user, schedule)\n+      else\n+        cb(null, schedule)","path":"src/scripts/pagerduty.coffee","position":23,"original_position":23,"commit_id":"75bacd17e144fb3b992b0f29d88b35885d33ff55","original_commit_id":"75bacd17e144fb3b992b0f29d88b35885d33ff55","user":{"login":"kuba-kubula","id":136198,"avatar_url":"https://avatars.githubusercontent.com/u/136198?v=3","gravatar_id":"","url":"https://api.github.com/users/kuba-kubula","html_url":"https://github.com/kuba-kubula","followers_url":"https://api.github.com/users/kuba-kubula/followers","following_url":"https://api.github.com/users/kuba-kubula/following{/other_user}","gists_url":"https://api.github.com/users/kuba-kubula/gists{/gist_id}","starred_url":"https://api.github.com/users/kuba-kubula/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kuba-kubula/subscriptions","organizations_url":"https://api.github.com/users/kuba-kubula/orgs","repos_url":"https://api.github.com/users/kuba-kubula/repos","events_url":"https://api.github.com/users/kuba-kubula/events{/privacy}","received_events_url":"https://api.github.com/users/kuba-kubula/received_events","type":"User","site_admin":false},"body":"@nadade would you mind adding this `else` block also to other variants of `if json.entries.length > 0 ...` too please? Thank you.","created_at":"2015-12-30T11:24:53Z","updated_at":"2015-12-30T11:24:53Z","html_url":"https://github.com/apiaryio/hubot-pager-me/pull/2#discussion_r48599266","pull_request_url":"https://api.github.com/repos/apiaryio/hubot-pager-me/pulls/2","_links":{"self":{"href":"https://api.github.com/repos/apiaryio/hubot-pager-me/pulls/comments/48599266"},"html":{"href":"https://github.com/apiaryio/hubot-pager-me/pull/2#discussion_r48599266"},"pull_request":{"href":"https://api.github.com/repos/apiaryio/hubot-pager-me/pulls/2"}}},"pull_request":{"url":"https://api.github.com/repos/apiaryio/hubot-pager-me/pulls/2","id":54792795,"html_url":"https://github.com/apiaryio/hubot-pager-me/pull/2","diff_url":"https://github.com/apiaryio/hubot-pager-me/pull/2.diff","patch_url":"https://github.com/apiaryio/hubot-pager-me/pull/2.patch","issue_url":"https://api.github.com/repos/apiaryio/hubot-pager-me/issues/2","number":2,"state":"open","locked":false,"title":"whos oncall working even if a schedule has no entries","user":{"login":"nadade","id":12198329,"avatar_url":"https://avatars.githubusercontent.com/u/12198329?v=3","gravatar_id":"","url":"https://api.github.com/users/nadade","html_url":"https://github.com/nadade","followers_url":"https://api.github.com/users/nadade/followers","following_url":"https://api.github.com/users/nadade/following{/other_user}","gists_url":"https://api.github.com/users/nadade/gists{/gist_id}","starred_url":"https://api.github.com/users/nadade/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nadade/subscriptions","organizations_url":"https://api.github.com/users/nadade/orgs","repos_url":"https://api.github.com/users/nadade/repos","events_url":"https://api.github.com/users/nadade/events{/privacy}","received_events_url":"https://api.github.com/users/nadade/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-12-30T11:10:57Z","updated_at":"2015-12-30T11:24:53Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4ad5a8ff7d6238280ae5e06be54d02bd1ce65b82","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/apiaryio/hubot-pager-me/pulls/2/commits","review_comments_url":"https://api.github.com/repos/apiaryio/hubot-pager-me/pulls/2/comments","review_comment_url":"https://api.github.com/repos/apiaryio/hubot-pager-me/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apiaryio/hubot-pager-me/issues/2/comments","statuses_url":"https://api.github.com/repos/apiaryio/hubot-pager-me/statuses/75bacd17e144fb3b992b0f29d88b35885d33ff55","head":{"label":"apiaryio:nadade/empty-schedule","ref":"nadade/empty-schedule","sha":"75bacd17e144fb3b992b0f29d88b35885d33ff55","user":{"login":"apiaryio","id":765943,"avatar_url":"https://avatars.githubusercontent.com/u/765943?v=3","gravatar_id":"","url":"https://api.github.com/users/apiaryio","html_url":"https://github.com/apiaryio","followers_url":"https://api.github.com/users/apiaryio/followers","following_url":"https://api.github.com/users/apiaryio/following{/other_user}","gists_url":"https://api.github.com/users/apiaryio/gists{/gist_id}","starred_url":"https://api.github.com/users/apiaryio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apiaryio/subscriptions","organizations_url":"https://api.github.com/users/apiaryio/orgs","repos_url":"https://api.github.com/users/apiaryio/repos","events_url":"https://api.github.com/users/apiaryio/events{/privacy}","received_events_url":"https://api.github.com/users/apiaryio/received_events","type":"Organization","site_admin":false},"repo":{"id":47835497,"name":"hubot-pager-me","full_name":"apiaryio/hubot-pager-me","owner":{"login":"apiaryio","id":765943,"avatar_url":"https://avatars.githubusercontent.com/u/765943?v=3","gravatar_id":"","url":"https://api.github.com/users/apiaryio","html_url":"https://github.com/apiaryio","followers_url":"https://api.github.com/users/apiaryio/followers","following_url":"https://api.github.com/users/apiaryio/following{/other_user}","gists_url":"https://api.github.com/users/apiaryio/gists{/gist_id}","starred_url":"https://api.github.com/users/apiaryio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apiaryio/subscriptions","organizations_url":"https://api.github.com/users/apiaryio/orgs","repos_url":"https://api.github.com/users/apiaryio/repos","events_url":"https://api.github.com/users/apiaryio/events{/privacy}","received_events_url":"https://api.github.com/users/apiaryio/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/apiaryio/hubot-pager-me","description":"PagerDuty integration for Hubot","fork":true,"url":"https://api.github.com/repos/apiaryio/hubot-pager-me","forks_url":"https://api.github.com/repos/apiaryio/hubot-pager-me/forks","keys_url":"https://api.github.com/repos/apiaryio/hubot-pager-me/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apiaryio/hubot-pager-me/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apiaryio/hubot-pager-me/teams","hooks_url":"https://api.github.com/repos/apiaryio/hubot-pager-me/hooks","issue_events_url":"https://api.github.com/repos/apiaryio/hubot-pager-me/issues/events{/number}","events_url":"https://api.github.com/repos/apiaryio/hubot-pager-me/events","assignees_url":"https://api.github.com/repos/apiaryio/hubot-pager-me/assignees{/user}","branches_url":"https://api.github.com/repos/apiaryio/hubot-pager-me/branches{/branch}","tags_url":"https://api.github.com/repos/apiaryio/hubot-pager-me/tags","blobs_url":"https://api.github.com/repos/apiaryio/hubot-pager-me/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apiaryio/hubot-pager-me/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apiaryio/hubot-pager-me/git/refs{/sha}","trees_url":"https://api.github.com/repos/apiaryio/hubot-pager-me/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apiaryio/hubot-pager-me/statuses/{sha}","languages_url":"https://api.github.com/repos/apiaryio/hubot-pager-me/languages","stargazers_url":"https://api.github.com/repos/apiaryio/hubot-pager-me/stargazers","contributors_url":"https://api.github.com/repos/apiaryio/hubot-pager-me/contributors","subscribers_url":"https://api.github.com/repos/apiaryio/hubot-pager-me/subscribers","subscription_url":"https://api.github.com/repos/apiaryio/hubot-pager-me/subscription","commits_url":"https://api.github.com/repos/apiaryio/hubot-pager-me/commits{/sha}","git_commits_url":"https://api.github.com/repos/apiaryio/hubot-pager-me/git/commits{/sha}","comments_url":"https://api.github.com/repos/apiaryio/hubot-pager-me/comments{/number}","issue_comment_url":"https://api.github.com/repos/apiaryio/hubot-pager-me/issues/comments{/number}","contents_url":"https://api.github.com/repos/apiaryio/hubot-pager-me/contents/{+path}","compare_url":"https://api.github.com/repos/apiaryio/hubot-pager-me/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apiaryio/hubot-pager-me/merges","archive_url":"https://api.github.com/repos/apiaryio/hubot-pager-me/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apiaryio/hubot-pager-me/downloads","issues_url":"https://api.github.com/repos/apiaryio/hubot-pager-me/issues{/number}","pulls_url":"https://api.github.com/repos/apiaryio/hubot-pager-me/pulls{/number}","milestones_url":"https://api.github.com/repos/apiaryio/hubot-pager-me/milestones{/number}","notifications_url":"https://api.github.com/repos/apiaryio/hubot-pager-me/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apiaryio/hubot-pager-me/labels{/name}","releases_url":"https://api.github.com/repos/apiaryio/hubot-pager-me/releases{/id}","created_at":"2015-12-11T15:49:44Z","updated_at":"2015-12-11T15:49:45Z","pushed_at":"2015-12-30T11:10:58Z","git_url":"git://github.com/apiaryio/hubot-pager-me.git","ssh_url":"git@github.com:apiaryio/hubot-pager-me.git","clone_url":"https://github.com/apiaryio/hubot-pager-me.git","svn_url":"https://github.com/apiaryio/hubot-pager-me","homepage":"https://www.npmjs.com/package/hubot-pager-me","size":208,"stargazers_count":0,"watchers_count":0,"language":"CoffeeScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"production"}},"base":{"label":"apiaryio:production","ref":"production","sha":"d34d129a6f8b14b67c6f40430c723b1f44a3323f","user":{"login":"apiaryio","id":765943,"avatar_url":"https://avatars.githubusercontent.com/u/765943?v=3","gravatar_id":"","url":"https://api.github.com/users/apiaryio","html_url":"https://github.com/apiaryio","followers_url":"https://api.github.com/users/apiaryio/followers","following_url":"https://api.github.com/users/apiaryio/following{/other_user}","gists_url":"https://api.github.com/users/apiaryio/gists{/gist_id}","starred_url":"https://api.github.com/users/apiaryio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apiaryio/subscriptions","organizations_url":"https://api.github.com/users/apiaryio/orgs","repos_url":"https://api.github.com/users/apiaryio/repos","events_url":"https://api.github.com/users/apiaryio/events{/privacy}","received_events_url":"https://api.github.com/users/apiaryio/received_events","type":"Organization","site_admin":false},"repo":{"id":47835497,"name":"hubot-pager-me","full_name":"apiaryio/hubot-pager-me","owner":{"login":"apiaryio","id":765943,"avatar_url":"https://avatars.githubusercontent.com/u/765943?v=3","gravatar_id":"","url":"https://api.github.com/users/apiaryio","html_url":"https://github.com/apiaryio","followers_url":"https://api.github.com/users/apiaryio/followers","following_url":"https://api.github.com/users/apiaryio/following{/other_user}","gists_url":"https://api.github.com/users/apiaryio/gists{/gist_id}","starred_url":"https://api.github.com/users/apiaryio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apiaryio/subscriptions","organizations_url":"https://api.github.com/users/apiaryio/orgs","repos_url":"https://api.github.com/users/apiaryio/repos","events_url":"https://api.github.com/users/apiaryio/events{/privacy}","received_events_url":"https://api.github.com/users/apiaryio/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/apiaryio/hubot-pager-me","description":"PagerDuty integration for Hubot","fork":true,"url":"https://api.github.com/repos/apiaryio/hubot-pager-me","forks_url":"https://api.github.com/repos/apiaryio/hubot-pager-me/forks","keys_url":"https://api.github.com/repos/apiaryio/hubot-pager-me/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apiaryio/hubot-pager-me/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apiaryio/hubot-pager-me/teams","hooks_url":"https://api.github.com/repos/apiaryio/hubot-pager-me/hooks","issue_events_url":"https://api.github.com/repos/apiaryio/hubot-pager-me/issues/events{/number}","events_url":"https://api.github.com/repos/apiaryio/hubot-pager-me/events","assignees_url":"https://api.github.com/repos/apiaryio/hubot-pager-me/assignees{/user}","branches_url":"https://api.github.com/repos/apiaryio/hubot-pager-me/branches{/branch}","tags_url":"https://api.github.com/repos/apiaryio/hubot-pager-me/tags","blobs_url":"https://api.github.com/repos/apiaryio/hubot-pager-me/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apiaryio/hubot-pager-me/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apiaryio/hubot-pager-me/git/refs{/sha}","trees_url":"https://api.github.com/repos/apiaryio/hubot-pager-me/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apiaryio/hubot-pager-me/statuses/{sha}","languages_url":"https://api.github.com/repos/apiaryio/hubot-pager-me/languages","stargazers_url":"https://api.github.com/repos/apiaryio/hubot-pager-me/stargazers","contributors_url":"https://api.github.com/repos/apiaryio/hubot-pager-me/contributors","subscribers_url":"https://api.github.com/repos/apiaryio/hubot-pager-me/subscribers","subscription_url":"https://api.github.com/repos/apiaryio/hubot-pager-me/subscription","commits_url":"https://api.github.com/repos/apiaryio/hubot-pager-me/commits{/sha}","git_commits_url":"https://api.github.com/repos/apiaryio/hubot-pager-me/git/commits{/sha}","comments_url":"https://api.github.com/repos/apiaryio/hubot-pager-me/comments{/number}","issue_comment_url":"https://api.github.com/repos/apiaryio/hubot-pager-me/issues/comments{/number}","contents_url":"https://api.github.com/repos/apiaryio/hubot-pager-me/contents/{+path}","compare_url":"https://api.github.com/repos/apiaryio/hubot-pager-me/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apiaryio/hubot-pager-me/merges","archive_url":"https://api.github.com/repos/apiaryio/hubot-pager-me/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apiaryio/hubot-pager-me/downloads","issues_url":"https://api.github.com/repos/apiaryio/hubot-pager-me/issues{/number}","pulls_url":"https://api.github.com/repos/apiaryio/hubot-pager-me/pulls{/number}","milestones_url":"https://api.github.com/repos/apiaryio/hubot-pager-me/milestones{/number}","notifications_url":"https://api.github.com/repos/apiaryio/hubot-pager-me/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apiaryio/hubot-pager-me/labels{/name}","releases_url":"https://api.github.com/repos/apiaryio/hubot-pager-me/releases{/id}","created_at":"2015-12-11T15:49:44Z","updated_at":"2015-12-11T15:49:45Z","pushed_at":"2015-12-30T11:10:58Z","git_url":"git://github.com/apiaryio/hubot-pager-me.git","ssh_url":"git@github.com:apiaryio/hubot-pager-me.git","clone_url":"https://github.com/apiaryio/hubot-pager-me.git","svn_url":"https://github.com/apiaryio/hubot-pager-me","homepage":"https://www.npmjs.com/package/hubot-pager-me","size":208,"stargazers_count":0,"watchers_count":0,"language":"CoffeeScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"production"}},"_links":{"self":{"href":"https://api.github.com/repos/apiaryio/hubot-pager-me/pulls/2"},"html":{"href":"https://github.com/apiaryio/hubot-pager-me/pull/2"},"issue":{"href":"https://api.github.com/repos/apiaryio/hubot-pager-me/issues/2"},"comments":{"href":"https://api.github.com/repos/apiaryio/hubot-pager-me/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/apiaryio/hubot-pager-me/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/apiaryio/hubot-pager-me/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apiaryio/hubot-pager-me/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/apiaryio/hubot-pager-me/statuses/75bacd17e144fb3b992b0f29d88b35885d33ff55"}}}}