{"action":"created","comment":{"url":"https://api.github.com/repos/guidance-guarantee-programme/telephone_appointment_planner/pulls/comments/84099507","pull_request_review_id":4898266,"id":84099507,"diff_hunk":"@@ -0,0 +1,14 @@\n+class Holiday < ApplicationRecord\n+  belongs_to :user, required: false\n+\n+  def self.merged_for_calendar_view\n+    select(<<-SQL\n+      DISTINCT ON(holidays.start_at, holidays.end_at, holidays.title)\n+        holidays.title, holidays.start_at, holidays.end_at, holidays.title || COALESCE(' - ' || string_agg(users.name, ', '), '') AS title\n+    SQL\n+          )\n+      .joins('LEFT JOIN users ON users.id = holidays.user_id')","path":"app/models/holiday.rb","position":10,"original_position":10,"commit_id":"00886f875d5a9355a5743a5ac9a47a1338a2fc43","original_commit_id":"7ca3f5dd067d5b870749faff93cb0b24f0cdd94d","user":{"login":"AndrewVos","id":363618,"avatar_url":"https://avatars.githubusercontent.com/u/363618?v=3","gravatar_id":"","url":"https://api.github.com/users/AndrewVos","html_url":"https://github.com/AndrewVos","followers_url":"https://api.github.com/users/AndrewVos/followers","following_url":"https://api.github.com/users/AndrewVos/following{/other_user}","gists_url":"https://api.github.com/users/AndrewVos/gists{/gist_id}","starred_url":"https://api.github.com/users/AndrewVos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AndrewVos/subscriptions","organizations_url":"https://api.github.com/users/AndrewVos/orgs","repos_url":"https://api.github.com/users/AndrewVos/repos","events_url":"https://api.github.com/users/AndrewVos/events{/privacy}","received_events_url":"https://api.github.com/users/AndrewVos/received_events","type":"User","site_admin":false},"body":"We don't really use users here though, the join is just so we can get at the user name.","created_at":"2016-10-19T15:37:16Z","updated_at":"2016-10-19T15:37:16Z","html_url":"https://github.com/guidance-guarantee-programme/telephone_appointment_planner/pull/96#discussion_r84099507","pull_request_url":"https://api.github.com/repos/guidance-guarantee-programme/telephone_appointment_planner/pulls/96","_links":{"self":{"href":"https://api.github.com/repos/guidance-guarantee-programme/telephone_appointment_planner/pulls/comments/84099507"},"html":{"href":"https://github.com/guidance-guarantee-programme/telephone_appointment_planner/pull/96#discussion_r84099507"},"pull_request":{"href":"https://api.github.com/repos/guidance-guarantee-programme/telephone_appointment_planner/pulls/96"}}},"pull_request":{"url":"https://api.github.com/repos/guidance-guarantee-programme/telephone_appointment_planner/pulls/96","id":89837635,"html_url":"https://github.com/guidance-guarantee-programme/telephone_appointment_planner/pull/96","diff_url":"https://github.com/guidance-guarantee-programme/telephone_appointment_planner/pull/96.diff","patch_url":"https://github.com/guidance-guarantee-programme/telephone_appointment_planner/pull/96.patch","issue_url":"https://api.github.com/repos/guidance-guarantee-programme/telephone_appointment_planner/issues/96","number":96,"state":"open","locked":false,"title":"Resource managers can view holidays","user":{"login":"AndrewVos","id":363618,"avatar_url":"https://avatars.githubusercontent.com/u/363618?v=3","gravatar_id":"","url":"https://api.github.com/users/AndrewVos","html_url":"https://github.com/AndrewVos","followers_url":"https://api.github.com/users/AndrewVos/followers","following_url":"https://api.github.com/users/AndrewVos/following{/other_user}","gists_url":"https://api.github.com/users/AndrewVos/gists{/gist_id}","starred_url":"https://api.github.com/users/AndrewVos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AndrewVos/subscriptions","organizations_url":"https://api.github.com/users/AndrewVos/orgs","repos_url":"https://api.github.com/users/AndrewVos/repos","events_url":"https://api.github.com/users/AndrewVos/events{/privacy}","received_events_url":"https://api.github.com/users/AndrewVos/received_events","type":"User","site_admin":false},"body":"- Add a link to /holidays in the nav\n- Appointments don't get assigned to guiders on a holiday\n- Don't show bookable slots if there's a holiday\n- Seed bank holidays with ActiveJob\n\n![https://dl.dropboxusercontent.com/u/1207191/screenshots/screenshot-18-10-2016-16-17-42-ahY4lah6.png](https://dl.dropboxusercontent.com/u/1207191/screenshots/screenshot-18-10-2016-16-17-42-ahY4lah6.png)","created_at":"2016-10-18T15:17:55Z","updated_at":"2016-10-19T15:37:16Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b11549586cd3b471bfc5cd4e1970550192fc768a","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/guidance-guarantee-programme/telephone_appointment_planner/pulls/96/commits","review_comments_url":"https://api.github.com/repos/guidance-guarantee-programme/telephone_appointment_planner/pulls/96/comments","review_comment_url":"https://api.github.com/repos/guidance-guarantee-programme/telephone_appointment_planner/pulls/comments{/number}","comments_url":"https://api.github.com/repos/guidance-guarantee-programme/telephone_appointment_planner/issues/96/comments","statuses_url":"https://api.github.com/repos/guidance-guarantee-programme/telephone_appointment_planner/statuses/00886f875d5a9355a5743a5ac9a47a1338a2fc43","head":{"label":"guidance-guarantee-programme:bank-holidays","ref":"bank-holidays","sha":"00886f875d5a9355a5743a5ac9a47a1338a2fc43","user":{"login":"guidance-guarantee-programme","id":8751528,"avatar_url":"https://avatars.githubusercontent.com/u/8751528?v=3","gravatar_id":"","url":"https://api.github.com/users/guidance-guarantee-programme","html_url":"https://github.com/guidance-guarantee-programme","followers_url":"https://api.github.com/users/guidance-guarantee-programme/followers","following_url":"https://api.github.com/users/guidance-guarantee-programme/following{/other_user}","gists_url":"https://api.github.com/users/guidance-guarantee-programme/gists{/gist_id}","starred_url":"https://api.github.com/users/guidance-guarantee-programme/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guidance-guarantee-programme/subscriptions","organizations_url":"https://api.github.com/users/guidance-guarantee-programme/orgs","repos_url":"https://api.github.com/users/guidance-guarantee-programme/repos","events_url":"https://api.github.com/users/guidance-guarantee-programme/events{/privacy}","received_events_url":"https://api.github.com/users/guidance-guarantee-programme/received_events","type":"Organization","site_admin":false},"repo":{"id":68911039,"name":"telephone_appointment_planner","full_name":"guidance-guarantee-programme/telephone_appointment_planner","owner":{"login":"guidance-guarantee-programme","id":8751528,"avatar_url":"https://avatars.githubusercontent.com/u/8751528?v=3","gravatar_id":"","url":"https://api.github.com/users/guidance-guarantee-programme","html_url":"https://github.com/guidance-guarantee-programme","followers_url":"https://api.github.com/users/guidance-guarantee-programme/followers","following_url":"https://api.github.com/users/guidance-guarantee-programme/following{/other_user}","gists_url":"https://api.github.com/users/guidance-guarantee-programme/gists{/gist_id}","starred_url":"https://api.github.com/users/guidance-guarantee-programme/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guidance-guarantee-programme/subscriptions","organizations_url":"https://api.github.com/users/guidance-guarantee-programme/orgs","repos_url":"https://api.github.com/users/guidance-guarantee-programme/repos","events_url":"https://api.github.com/users/guidance-guarantee-programme/events{/privacy}","received_events_url":"https://api.github.com/users/guidance-guarantee-programme/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/guidance-guarantee-programme/telephone_appointment_planner","description":"Telephone Appointment Planner","fork":false,"url":"https://api.github.com/repos/guidance-guarantee-programme/telephone_appointment_planner","forks_url":"https://api.github.com/repos/guidance-guarantee-programme/telephone_appointment_planner/forks","keys_url":"https://api.github.com/repos/guidance-guarantee-programme/telephone_appointment_planner/keys{/key_id}","collaborators_url":"https://api.github.com/repos/guidance-guarantee-programme/telephone_appointment_planner/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/guidance-guarantee-programme/telephone_appointment_planner/teams","hooks_url":"https://api.github.com/repos/guidance-guarantee-programme/telephone_appointment_planner/hooks","issue_events_url":"https://api.github.com/repos/guidance-guarantee-programme/telephone_appointment_planner/issues/events{/number}","events_url":"https://api.github.com/repos/guidance-guarantee-programme/telephone_appointment_planner/events","assignees_url":"https://api.github.com/repos/guidance-guarantee-programme/telephone_appointment_planner/assignees{/user}","branches_url":"https://api.github.com/repos/guidance-guarantee-programme/telephone_appointment_planner/branches{/branch}","tags_url":"https://api.github.com/repos/guidance-guarantee-programme/telephone_appointment_planner/tags","blobs_url":"https://api.github.com/repos/guidance-guarantee-programme/telephone_appointment_planner/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/guidance-guarantee-programme/telephone_appointment_planner/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/guidance-guarantee-programme/telephone_appointment_planner/git/refs{/sha}","trees_url":"https://api.github.com/repos/guidance-guarantee-programme/telephone_appointment_planner/git/trees{/sha}","statuses_url":"https://api.github.com/repos/guidance-guarantee-programme/telephone_appointment_planner/statuses/{sha}","languages_url":"https://api.github.com/repos/guidance-guarantee-programme/telephone_appointment_planner/languages","stargazers_url":"https://api.github.com/repos/guidance-guarantee-programme/telephone_appointment_planner/stargazers","contributors_url":"https://api.github.com/repos/guidance-guarantee-programme/telephone_appointment_planner/contributors","subscribers_url":"https://api.github.com/repos/guidance-guarantee-programme/telephone_appointment_planner/subscribers","subscription_url":"https://api.github.com/repos/guidance-guarantee-programme/telephone_appointment_planner/subscription","commits_url":"https://api.github.com/repos/guidance-guarantee-programme/telephone_appointment_planner/commits{/sha}","git_commits_url":"https://api.github.com/repos/guidance-guarantee-programme/telephone_appointment_planner/git/commits{/sha}","comments_url":"https://api.github.com/repos/guidance-guarantee-programme/telephone_appointment_planner/comments{/number}","issue_comment_url":"https://api.github.com/repos/guidance-guarantee-programme/telephone_appointment_planner/issues/comments{/number}","contents_url":"https://api.github.com/repos/guidance-guarantee-programme/telephone_appointment_planner/contents/{+path}","compare_url":"https://api.github.com/repos/guidance-guarantee-programme/telephone_appointment_planner/compare/{base}...{head}","merges_url":"https://api.github.com/repos/guidance-guarantee-programme/telephone_appointment_planner/merges","archive_url":"https://api.github.com/repos/guidance-guarantee-programme/telephone_appointment_planner/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/guidance-guarantee-programme/telephone_appointment_planner/downloads","issues_url":"https://api.github.com/repos/guidance-guarantee-programme/telephone_appointment_planner/issues{/number}","pulls_url":"https://api.github.com/repos/guidance-guarantee-programme/telephone_appointment_planner/pulls{/number}","milestones_url":"https://api.github.com/repos/guidance-guarantee-programme/telephone_appointment_planner/milestones{/number}","notifications_url":"https://api.github.com/repos/guidance-guarantee-programme/telephone_appointment_planner/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/guidance-guarantee-programme/telephone_appointment_planner/labels{/name}","releases_url":"https://api.github.com/repos/guidance-guarantee-programme/telephone_appointment_planner/releases{/id}","deployments_url":"https://api.github.com/repos/guidance-guarantee-programme/telephone_appointment_planner/deployments","created_at":"2016-09-22T10:33:15Z","updated_at":"2016-10-09T17:14:10Z","pushed_at":"2016-10-19T15:36:00Z","git_url":"git://github.com/guidance-guarantee-programme/telephone_appointment_planner.git","ssh_url":"git@github.com:guidance-guarantee-programme/telephone_appointment_planner.git","clone_url":"https://github.com/guidance-guarantee-programme/telephone_appointment_planner.git","svn_url":"https://github.com/guidance-guarantee-programme/telephone_appointment_planner","homepage":null,"size":393,"stargazers_count":1,"watchers_count":1,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":4,"forks":0,"open_issues":4,"watchers":1,"default_branch":"master"}},"base":{"label":"guidance-guarantee-programme:master","ref":"master","sha":"d625099c5eaf95a17c2e5cf963c27b0c1a153468","user":{"login":"guidance-guarantee-programme","id":8751528,"avatar_url":"https://avatars.githubusercontent.com/u/8751528?v=3","gravatar_id":"","url":"https://api.github.com/users/guidance-guarantee-programme","html_url":"https://github.com/guidance-guarantee-programme","followers_url":"https://api.github.com/users/guidance-guarantee-programme/followers","following_url":"https://api.github.com/users/guidance-guarantee-programme/following{/other_user}","gists_url":"https://api.github.com/users/guidance-guarantee-programme/gists{/gist_id}","starred_url":"https://api.github.com/users/guidance-guarantee-programme/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guidance-guarantee-programme/subscriptions","organizations_url":"https://api.github.com/users/guidance-guarantee-programme/orgs","repos_url":"https://api.github.com/users/guidance-guarantee-programme/repos","events_url":"https://api.github.com/users/guidance-guarantee-programme/events{/privacy}","received_events_url":"https://api.github.com/users/guidance-guarantee-programme/received_events","type":"Organization","site_admin":false},"repo":{"id":68911039,"name":"telephone_appointment_planner","full_name":"guidance-guarantee-programme/telephone_appointment_planner","owner":{"login":"guidance-guarantee-programme","id":8751528,"avatar_url":"https://avatars.githubusercontent.com/u/8751528?v=3","gravatar_id":"","url":"https://api.github.com/users/guidance-guarantee-programme","html_url":"https://github.com/guidance-guarantee-programme","followers_url":"https://api.github.com/users/guidance-guarantee-programme/followers","following_url":"https://api.github.com/users/guidance-guarantee-programme/following{/other_user}","gists_url":"https://api.github.com/users/guidance-guarantee-programme/gists{/gist_id}","starred_url":"https://api.github.com/users/guidance-guarantee-programme/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guidance-guarantee-programme/subscriptions","organizations_url":"https://api.github.com/users/guidance-guarantee-programme/orgs","repos_url":"https://api.github.com/users/guidance-guarantee-programme/repos","events_url":"https://api.github.com/users/guidance-guarantee-programme/events{/privacy}","received_events_url":"https://api.github.com/users/guidance-guarantee-programme/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/guidance-guarantee-programme/telephone_appointment_planner","description":"Telephone Appointment Planner","fork":false,"url":"https://api.github.com/repos/guidance-guarantee-programme/telephone_appointment_planner","forks_url":"https://api.github.com/repos/guidance-guarantee-programme/telephone_appointment_planner/forks","keys_url":"https://api.github.com/repos/guidance-guarantee-programme/telephone_appointment_planner/keys{/key_id}","collaborators_url":"https://api.github.com/repos/guidance-guarantee-programme/telephone_appointment_planner/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/guidance-guarantee-programme/telephone_appointment_planner/teams","hooks_url":"https://api.github.com/repos/guidance-guarantee-programme/telephone_appointment_planner/hooks","issue_events_url":"https://api.github.com/repos/guidance-guarantee-programme/telephone_appointment_planner/issues/events{/number}","events_url":"https://api.github.com/repos/guidance-guarantee-programme/telephone_appointment_planner/events","assignees_url":"https://api.github.com/repos/guidance-guarantee-programme/telephone_appointment_planner/assignees{/user}","branches_url":"https://api.github.com/repos/guidance-guarantee-programme/telephone_appointment_planner/branches{/branch}","tags_url":"https://api.github.com/repos/guidance-guarantee-programme/telephone_appointment_planner/tags","blobs_url":"https://api.github.com/repos/guidance-guarantee-programme/telephone_appointment_planner/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/guidance-guarantee-programme/telephone_appointment_planner/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/guidance-guarantee-programme/telephone_appointment_planner/git/refs{/sha}","trees_url":"https://api.github.com/repos/guidance-guarantee-programme/telephone_appointment_planner/git/trees{/sha}","statuses_url":"https://api.github.com/repos/guidance-guarantee-programme/telephone_appointment_planner/statuses/{sha}","languages_url":"https://api.github.com/repos/guidance-guarantee-programme/telephone_appointment_planner/languages","stargazers_url":"https://api.github.com/repos/guidance-guarantee-programme/telephone_appointment_planner/stargazers","contributors_url":"https://api.github.com/repos/guidance-guarantee-programme/telephone_appointment_planner/contributors","subscribers_url":"https://api.github.com/repos/guidance-guarantee-programme/telephone_appointment_planner/subscribers","subscription_url":"https://api.github.com/repos/guidance-guarantee-programme/telephone_appointment_planner/subscription","commits_url":"https://api.github.com/repos/guidance-guarantee-programme/telephone_appointment_planner/commits{/sha}","git_commits_url":"https://api.github.com/repos/guidance-guarantee-programme/telephone_appointment_planner/git/commits{/sha}","comments_url":"https://api.github.com/repos/guidance-guarantee-programme/telephone_appointment_planner/comments{/number}","issue_comment_url":"https://api.github.com/repos/guidance-guarantee-programme/telephone_appointment_planner/issues/comments{/number}","contents_url":"https://api.github.com/repos/guidance-guarantee-programme/telephone_appointment_planner/contents/{+path}","compare_url":"https://api.github.com/repos/guidance-guarantee-programme/telephone_appointment_planner/compare/{base}...{head}","merges_url":"https://api.github.com/repos/guidance-guarantee-programme/telephone_appointment_planner/merges","archive_url":"https://api.github.com/repos/guidance-guarantee-programme/telephone_appointment_planner/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/guidance-guarantee-programme/telephone_appointment_planner/downloads","issues_url":"https://api.github.com/repos/guidance-guarantee-programme/telephone_appointment_planner/issues{/number}","pulls_url":"https://api.github.com/repos/guidance-guarantee-programme/telephone_appointment_planner/pulls{/number}","milestones_url":"https://api.github.com/repos/guidance-guarantee-programme/telephone_appointment_planner/milestones{/number}","notifications_url":"https://api.github.com/repos/guidance-guarantee-programme/telephone_appointment_planner/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/guidance-guarantee-programme/telephone_appointment_planner/labels{/name}","releases_url":"https://api.github.com/repos/guidance-guarantee-programme/telephone_appointment_planner/releases{/id}","deployments_url":"https://api.github.com/repos/guidance-guarantee-programme/telephone_appointment_planner/deployments","created_at":"2016-09-22T10:33:15Z","updated_at":"2016-10-09T17:14:10Z","pushed_at":"2016-10-19T15:36:00Z","git_url":"git://github.com/guidance-guarantee-programme/telephone_appointment_planner.git","ssh_url":"git@github.com:guidance-guarantee-programme/telephone_appointment_planner.git","clone_url":"https://github.com/guidance-guarantee-programme/telephone_appointment_planner.git","svn_url":"https://github.com/guidance-guarantee-programme/telephone_appointment_planner","homepage":null,"size":393,"stargazers_count":1,"watchers_count":1,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":4,"forks":0,"open_issues":4,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/guidance-guarantee-programme/telephone_appointment_planner/pulls/96"},"html":{"href":"https://github.com/guidance-guarantee-programme/telephone_appointment_planner/pull/96"},"issue":{"href":"https://api.github.com/repos/guidance-guarantee-programme/telephone_appointment_planner/issues/96"},"comments":{"href":"https://api.github.com/repos/guidance-guarantee-programme/telephone_appointment_planner/issues/96/comments"},"review_comments":{"href":"https://api.github.com/repos/guidance-guarantee-programme/telephone_appointment_planner/pulls/96/comments"},"review_comment":{"href":"https://api.github.com/repos/guidance-guarantee-programme/telephone_appointment_planner/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/guidance-guarantee-programme/telephone_appointment_planner/pulls/96/commits"},"statuses":{"href":"https://api.github.com/repos/guidance-guarantee-programme/telephone_appointment_planner/statuses/00886f875d5a9355a5743a5ac9a47a1338a2fc43"}}}}
{"actor":{"display_login":"AndrewVos"}}