{"action":"created","comment":{"url":"https://api.github.com/repos/alphagov/rummager/pulls/comments/130328846","pull_request_review_id":53190191,"id":130328846,"diff_hunk":"@@ -13,10 +14,10 @@ def self.sitemap_limit\n   def get_all_documents\n     Enumerator.new do |yielder|\n       # Hard-code the site root, as it isn't listed in any search index\n-      yielder << \"/\"\n+      yielder << homepage_document\n \n       @sitemap_indices.each do |index|\n-        index.all_document_links(EXCLUDED_FORMATS).each do |document|\n+        index.all_documents(exclude_formats: EXCLUDED_FORMATS).each do |document|\n           if document","path":"lib/sitemap/sitemap_generator.rb","position":18,"original_position":18,"commit_id":"0e0a7367f19731daec25c1debd03445ffc573de2","original_commit_id":"0e0a7367f19731daec25c1debd03445ffc573de2","user":{"login":"suzannehamilton","id":754712,"avatar_url":"https://avatars0.githubusercontent.com/u/754712?v=4","gravatar_id":"","url":"https://api.github.com/users/suzannehamilton","html_url":"https://github.com/suzannehamilton","followers_url":"https://api.github.com/users/suzannehamilton/followers","following_url":"https://api.github.com/users/suzannehamilton/following{/other_user}","gists_url":"https://api.github.com/users/suzannehamilton/gists{/gist_id}","starred_url":"https://api.github.com/users/suzannehamilton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/suzannehamilton/subscriptions","organizations_url":"https://api.github.com/users/suzannehamilton/orgs","repos_url":"https://api.github.com/users/suzannehamilton/repos","events_url":"https://api.github.com/users/suzannehamilton/events{/privacy}","received_events_url":"https://api.github.com/users/suzannehamilton/received_events","type":"User","site_admin":false},"body":"Good question. In principle this is possible because it's not a required field. In practice, every document in ES does have a `link` field. (I've just checked on production.)\r\n\r\nDo you think it's worth checking during sitemap generation?","created_at":"2017-07-31T11:27:44Z","updated_at":"2017-07-31T11:27:44Z","html_url":"https://github.com/alphagov/rummager/pull/840#discussion_r130328846","pull_request_url":"https://api.github.com/repos/alphagov/rummager/pulls/840","_links":{"self":{"href":"https://api.github.com/repos/alphagov/rummager/pulls/comments/130328846"},"html":{"href":"https://github.com/alphagov/rummager/pull/840#discussion_r130328846"},"pull_request":{"href":"https://api.github.com/repos/alphagov/rummager/pulls/840"}}},"pull_request":{"url":"https://api.github.com/repos/alphagov/rummager/pulls/840","id":133194932,"html_url":"https://github.com/alphagov/rummager/pull/840","diff_url":"https://github.com/alphagov/rummager/pull/840.diff","patch_url":"https://github.com/alphagov/rummager/pull/840.patch","issue_url":"https://api.github.com/repos/alphagov/rummager/issues/840","number":840,"state":"open","locked":false,"title":"Add page timestamps to sitemap","user":{"login":"suzannehamilton","id":754712,"avatar_url":"https://avatars0.githubusercontent.com/u/754712?v=4","gravatar_id":"","url":"https://api.github.com/users/suzannehamilton","html_url":"https://github.com/suzannehamilton","followers_url":"https://api.github.com/users/suzannehamilton/followers","following_url":"https://api.github.com/users/suzannehamilton/following{/other_user}","gists_url":"https://api.github.com/users/suzannehamilton/gists{/gist_id}","starred_url":"https://api.github.com/users/suzannehamilton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/suzannehamilton/subscriptions","organizations_url":"https://api.github.com/users/suzannehamilton/orgs","repos_url":"https://api.github.com/users/suzannehamilton/repos","events_url":"https://api.github.com/users/suzannehamilton/events{/privacy}","received_events_url":"https://api.github.com/users/suzannehamilton/received_events","type":"User","site_admin":false},"body":"- Refactor method which fetches all documents. This gives the sitemap generator access to more fields, such as the last modified date (which is used in the next commit) and the format (which will be used to modify page priority in a later PR).\r\n- Add a `lastmod` field to entries in the sitemap, based on the `public_timestamp` field in Elasticsearch. This will help search engines rank GOV.UK pages against each other by boosting more recent content. This should help users to find more recent, relevant pages when searching in an external search engine.\r\n\r\nhttps://trello.com/c/DJx7rxiy/190-add-timestamps-to-sitemap","created_at":"2017-07-31T08:55:47Z","updated_at":"2017-07-31T11:27:44Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3c35b16c5ecc7f643a4d7830aafa65d3b29d0ed1","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/alphagov/rummager/pulls/840/commits","review_comments_url":"https://api.github.com/repos/alphagov/rummager/pulls/840/comments","review_comment_url":"https://api.github.com/repos/alphagov/rummager/pulls/comments{/number}","comments_url":"https://api.github.com/repos/alphagov/rummager/issues/840/comments","statuses_url":"https://api.github.com/repos/alphagov/rummager/statuses/0e0a7367f19731daec25c1debd03445ffc573de2","head":{"label":"alphagov:sitemap-lastmod","ref":"sitemap-lastmod","sha":"0e0a7367f19731daec25c1debd03445ffc573de2","user":{"login":"alphagov","id":596977,"avatar_url":"https://avatars0.githubusercontent.com/u/596977?v=4","gravatar_id":"","url":"https://api.github.com/users/alphagov","html_url":"https://github.com/alphagov","followers_url":"https://api.github.com/users/alphagov/followers","following_url":"https://api.github.com/users/alphagov/following{/other_user}","gists_url":"https://api.github.com/users/alphagov/gists{/gist_id}","starred_url":"https://api.github.com/users/alphagov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alphagov/subscriptions","organizations_url":"https://api.github.com/users/alphagov/orgs","repos_url":"https://api.github.com/users/alphagov/repos","events_url":"https://api.github.com/users/alphagov/events{/privacy}","received_events_url":"https://api.github.com/users/alphagov/received_events","type":"Organization","site_admin":false},"repo":{"id":2686767,"name":"rummager","full_name":"alphagov/rummager","owner":{"login":"alphagov","id":596977,"avatar_url":"https://avatars0.githubusercontent.com/u/596977?v=4","gravatar_id":"","url":"https://api.github.com/users/alphagov","html_url":"https://github.com/alphagov","followers_url":"https://api.github.com/users/alphagov/followers","following_url":"https://api.github.com/users/alphagov/following{/other_user}","gists_url":"https://api.github.com/users/alphagov/gists{/gist_id}","starred_url":"https://api.github.com/users/alphagov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alphagov/subscriptions","organizations_url":"https://api.github.com/users/alphagov/orgs","repos_url":"https://api.github.com/users/alphagov/repos","events_url":"https://api.github.com/users/alphagov/events{/privacy}","received_events_url":"https://api.github.com/users/alphagov/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/alphagov/rummager","description":"Search API for GOV.UK","fork":false,"url":"https://api.github.com/repos/alphagov/rummager","forks_url":"https://api.github.com/repos/alphagov/rummager/forks","keys_url":"https://api.github.com/repos/alphagov/rummager/keys{/key_id}","collaborators_url":"https://api.github.com/repos/alphagov/rummager/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/alphagov/rummager/teams","hooks_url":"https://api.github.com/repos/alphagov/rummager/hooks","issue_events_url":"https://api.github.com/repos/alphagov/rummager/issues/events{/number}","events_url":"https://api.github.com/repos/alphagov/rummager/events","assignees_url":"https://api.github.com/repos/alphagov/rummager/assignees{/user}","branches_url":"https://api.github.com/repos/alphagov/rummager/branches{/branch}","tags_url":"https://api.github.com/repos/alphagov/rummager/tags","blobs_url":"https://api.github.com/repos/alphagov/rummager/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/alphagov/rummager/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/alphagov/rummager/git/refs{/sha}","trees_url":"https://api.github.com/repos/alphagov/rummager/git/trees{/sha}","statuses_url":"https://api.github.com/repos/alphagov/rummager/statuses/{sha}","languages_url":"https://api.github.com/repos/alphagov/rummager/languages","stargazers_url":"https://api.github.com/repos/alphagov/rummager/stargazers","contributors_url":"https://api.github.com/repos/alphagov/rummager/contributors","subscribers_url":"https://api.github.com/repos/alphagov/rummager/subscribers","subscription_url":"https://api.github.com/repos/alphagov/rummager/subscription","commits_url":"https://api.github.com/repos/alphagov/rummager/commits{/sha}","git_commits_url":"https://api.github.com/repos/alphagov/rummager/git/commits{/sha}","comments_url":"https://api.github.com/repos/alphagov/rummager/comments{/number}","issue_comment_url":"https://api.github.com/repos/alphagov/rummager/issues/comments{/number}","contents_url":"https://api.github.com/repos/alphagov/rummager/contents/{+path}","compare_url":"https://api.github.com/repos/alphagov/rummager/compare/{base}...{head}","merges_url":"https://api.github.com/repos/alphagov/rummager/merges","archive_url":"https://api.github.com/repos/alphagov/rummager/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/alphagov/rummager/downloads","issues_url":"https://api.github.com/repos/alphagov/rummager/issues{/number}","pulls_url":"https://api.github.com/repos/alphagov/rummager/pulls{/number}","milestones_url":"https://api.github.com/repos/alphagov/rummager/milestones{/number}","notifications_url":"https://api.github.com/repos/alphagov/rummager/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/alphagov/rummager/labels{/name}","releases_url":"https://api.github.com/repos/alphagov/rummager/releases{/id}","deployments_url":"https://api.github.com/repos/alphagov/rummager/deployments","created_at":"2011-11-01T10:12:45Z","updated_at":"2017-07-24T14:31:24Z","pushed_at":"2017-07-31T11:03:40Z","git_url":"git://github.com/alphagov/rummager.git","ssh_url":"git@github.com:alphagov/rummager.git","clone_url":"https://github.com/alphagov/rummager.git","svn_url":"https://github.com/alphagov/rummager","homepage":"https://docs.publishing.service.gov.uk/apps/rummager.html","size":4362,"stargazers_count":33,"watchers_count":33,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":10,"mirror_url":null,"open_issues_count":2,"forks":10,"open_issues":2,"watchers":33,"default_branch":"master"}},"base":{"label":"alphagov:master","ref":"master","sha":"e5db872365eccf1cc1f08c0aff9d0dc55fc11728","user":{"login":"alphagov","id":596977,"avatar_url":"https://avatars0.githubusercontent.com/u/596977?v=4","gravatar_id":"","url":"https://api.github.com/users/alphagov","html_url":"https://github.com/alphagov","followers_url":"https://api.github.com/users/alphagov/followers","following_url":"https://api.github.com/users/alphagov/following{/other_user}","gists_url":"https://api.github.com/users/alphagov/gists{/gist_id}","starred_url":"https://api.github.com/users/alphagov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alphagov/subscriptions","organizations_url":"https://api.github.com/users/alphagov/orgs","repos_url":"https://api.github.com/users/alphagov/repos","events_url":"https://api.github.com/users/alphagov/events{/privacy}","received_events_url":"https://api.github.com/users/alphagov/received_events","type":"Organization","site_admin":false},"repo":{"id":2686767,"name":"rummager","full_name":"alphagov/rummager","owner":{"login":"alphagov","id":596977,"avatar_url":"https://avatars0.githubusercontent.com/u/596977?v=4","gravatar_id":"","url":"https://api.github.com/users/alphagov","html_url":"https://github.com/alphagov","followers_url":"https://api.github.com/users/alphagov/followers","following_url":"https://api.github.com/users/alphagov/following{/other_user}","gists_url":"https://api.github.com/users/alphagov/gists{/gist_id}","starred_url":"https://api.github.com/users/alphagov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alphagov/subscriptions","organizations_url":"https://api.github.com/users/alphagov/orgs","repos_url":"https://api.github.com/users/alphagov/repos","events_url":"https://api.github.com/users/alphagov/events{/privacy}","received_events_url":"https://api.github.com/users/alphagov/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/alphagov/rummager","description":"Search API for GOV.UK","fork":false,"url":"https://api.github.com/repos/alphagov/rummager","forks_url":"https://api.github.com/repos/alphagov/rummager/forks","keys_url":"https://api.github.com/repos/alphagov/rummager/keys{/key_id}","collaborators_url":"https://api.github.com/repos/alphagov/rummager/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/alphagov/rummager/teams","hooks_url":"https://api.github.com/repos/alphagov/rummager/hooks","issue_events_url":"https://api.github.com/repos/alphagov/rummager/issues/events{/number}","events_url":"https://api.github.com/repos/alphagov/rummager/events","assignees_url":"https://api.github.com/repos/alphagov/rummager/assignees{/user}","branches_url":"https://api.github.com/repos/alphagov/rummager/branches{/branch}","tags_url":"https://api.github.com/repos/alphagov/rummager/tags","blobs_url":"https://api.github.com/repos/alphagov/rummager/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/alphagov/rummager/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/alphagov/rummager/git/refs{/sha}","trees_url":"https://api.github.com/repos/alphagov/rummager/git/trees{/sha}","statuses_url":"https://api.github.com/repos/alphagov/rummager/statuses/{sha}","languages_url":"https://api.github.com/repos/alphagov/rummager/languages","stargazers_url":"https://api.github.com/repos/alphagov/rummager/stargazers","contributors_url":"https://api.github.com/repos/alphagov/rummager/contributors","subscribers_url":"https://api.github.com/repos/alphagov/rummager/subscribers","subscription_url":"https://api.github.com/repos/alphagov/rummager/subscription","commits_url":"https://api.github.com/repos/alphagov/rummager/commits{/sha}","git_commits_url":"https://api.github.com/repos/alphagov/rummager/git/commits{/sha}","comments_url":"https://api.github.com/repos/alphagov/rummager/comments{/number}","issue_comment_url":"https://api.github.com/repos/alphagov/rummager/issues/comments{/number}","contents_url":"https://api.github.com/repos/alphagov/rummager/contents/{+path}","compare_url":"https://api.github.com/repos/alphagov/rummager/compare/{base}...{head}","merges_url":"https://api.github.com/repos/alphagov/rummager/merges","archive_url":"https://api.github.com/repos/alphagov/rummager/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/alphagov/rummager/downloads","issues_url":"https://api.github.com/repos/alphagov/rummager/issues{/number}","pulls_url":"https://api.github.com/repos/alphagov/rummager/pulls{/number}","milestones_url":"https://api.github.com/repos/alphagov/rummager/milestones{/number}","notifications_url":"https://api.github.com/repos/alphagov/rummager/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/alphagov/rummager/labels{/name}","releases_url":"https://api.github.com/repos/alphagov/rummager/releases{/id}","deployments_url":"https://api.github.com/repos/alphagov/rummager/deployments","created_at":"2011-11-01T10:12:45Z","updated_at":"2017-07-24T14:31:24Z","pushed_at":"2017-07-31T11:03:40Z","git_url":"git://github.com/alphagov/rummager.git","ssh_url":"git@github.com:alphagov/rummager.git","clone_url":"https://github.com/alphagov/rummager.git","svn_url":"https://github.com/alphagov/rummager","homepage":"https://docs.publishing.service.gov.uk/apps/rummager.html","size":4362,"stargazers_count":33,"watchers_count":33,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":10,"mirror_url":null,"open_issues_count":2,"forks":10,"open_issues":2,"watchers":33,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/alphagov/rummager/pulls/840"},"html":{"href":"https://github.com/alphagov/rummager/pull/840"},"issue":{"href":"https://api.github.com/repos/alphagov/rummager/issues/840"},"comments":{"href":"https://api.github.com/repos/alphagov/rummager/issues/840/comments"},"review_comments":{"href":"https://api.github.com/repos/alphagov/rummager/pulls/840/comments"},"review_comment":{"href":"https://api.github.com/repos/alphagov/rummager/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/alphagov/rummager/pulls/840/commits"},"statuses":{"href":"https://api.github.com/repos/alphagov/rummager/statuses/0e0a7367f19731daec25c1debd03445ffc573de2"}}}}
{"actor":{"display_login":"suzannehamilton"}}