{"action":"created","comment":{"url":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/pulls/comments/62044812","id":62044812,"diff_hunk":"@@ -37,13 +37,26 @@ def to_json\n   def details\n     {\n       body: GovspeakPresenter.present(document.body),\n+      headers: headers,","path":"app/presenters/document_presenter.rb","position":4,"original_position":4,"commit_id":"6c8d77dd70a5bb8aae2e8c4f7db54e2c2d2d542e","original_commit_id":"6c8d77dd70a5bb8aae2e8c4f7db54e2c2d2d542e","user":{"login":"h-lame","id":608,"avatar_url":"https://avatars.githubusercontent.com/u/608?v=3","gravatar_id":"","url":"https://api.github.com/users/h-lame","html_url":"https://github.com/h-lame","followers_url":"https://api.github.com/users/h-lame/followers","following_url":"https://api.github.com/users/h-lame/following{/other_user}","gists_url":"https://api.github.com/users/h-lame/gists{/gist_id}","starred_url":"https://api.github.com/users/h-lame/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/h-lame/subscriptions","organizations_url":"https://api.github.com/users/h-lame/orgs","repos_url":"https://api.github.com/users/h-lame/repos","events_url":"https://api.github.com/users/h-lame/events{/privacy}","received_events_url":"https://api.github.com/users/h-lame/received_events","type":"User","site_admin":false},"body":"Should this be in the `.tap` so that we don't add it if there are no `headers` at all - I don't think we have spec for that scenario.","created_at":"2016-05-04T14:08:54Z","updated_at":"2016-05-04T14:08:54Z","html_url":"https://github.com/alphagov/specialist-publisher-rebuild/pull/734#discussion_r62044812","pull_request_url":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/pulls/734","_links":{"self":{"href":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/pulls/comments/62044812"},"html":{"href":"https://github.com/alphagov/specialist-publisher-rebuild/pull/734#discussion_r62044812"},"pull_request":{"href":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/pulls/734"}}},"pull_request":{"url":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/pulls/734","id":68384784,"html_url":"https://github.com/alphagov/specialist-publisher-rebuild/pull/734","diff_url":"https://github.com/alphagov/specialist-publisher-rebuild/pull/734.diff","patch_url":"https://github.com/alphagov/specialist-publisher-rebuild/pull/734.patch","issue_url":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/issues/734","number":734,"state":"open","locked":false,"title":"Ensure headers navigation is rendered for specialist-documents","user":{"login":"davidbasalla","id":5112255,"avatar_url":"https://avatars.githubusercontent.com/u/5112255?v=3","gravatar_id":"","url":"https://api.github.com/users/davidbasalla","html_url":"https://github.com/davidbasalla","followers_url":"https://api.github.com/users/davidbasalla/followers","following_url":"https://api.github.com/users/davidbasalla/following{/other_user}","gists_url":"https://api.github.com/users/davidbasalla/gists{/gist_id}","starred_url":"https://api.github.com/users/davidbasalla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidbasalla/subscriptions","organizations_url":"https://api.github.com/users/davidbasalla/orgs","repos_url":"https://api.github.com/users/davidbasalla/repos","events_url":"https://api.github.com/users/davidbasalla/events{/privacy}","received_events_url":"https://api.github.com/users/davidbasalla/received_events","type":"User","site_admin":false},"body":"Headers data is now sent to the publishing-api to ensure that headers navigation renders on specialist-frontend.\r\n\r\nPaired with @davidbasalla.\r\n\r\n`remove_empty_headers` method has been implemented to match specifications within content schema which enforce that ‘headers’ values must not be empty (https://github.com/alphagov/govuk-content-schemas/blob/master/formats/specialist_document/publisher/details.json#L72). Previously the GovSpeak `structured_headers` method was generating a key `headers` which would be an empty array unless it contained a nested header, causing contract tests to fail.","created_at":"2016-04-29T14:58:07Z","updated_at":"2016-05-04T14:08:54Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3c33213e37ce7a6e9e913a212741a6e4b65a78cb","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/pulls/734/commits","review_comments_url":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/pulls/734/comments","review_comment_url":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/pulls/comments{/number}","comments_url":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/issues/734/comments","statuses_url":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/statuses/6c8d77dd70a5bb8aae2e8c4f7db54e2c2d2d542e","head":{"label":"alphagov:headings-missing-specialist-documents","ref":"headings-missing-specialist-documents","sha":"6c8d77dd70a5bb8aae2e8c4f7db54e2c2d2d542e","user":{"login":"alphagov","id":596977,"avatar_url":"https://avatars.githubusercontent.com/u/596977?v=3","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":55792443,"name":"specialist-publisher-rebuild","full_name":"alphagov/specialist-publisher-rebuild","owner":{"login":"alphagov","id":596977,"avatar_url":"https://avatars.githubusercontent.com/u/596977?v=3","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/specialist-publisher-rebuild","description":"Publishing app for specialist documents and manuals on GOV.UK","fork":false,"url":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild","forks_url":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/forks","keys_url":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/keys{/key_id}","collaborators_url":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/teams","hooks_url":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/hooks","issue_events_url":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/issues/events{/number}","events_url":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/events","assignees_url":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/assignees{/user}","branches_url":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/branches{/branch}","tags_url":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/tags","blobs_url":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/git/refs{/sha}","trees_url":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/git/trees{/sha}","statuses_url":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/statuses/{sha}","languages_url":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/languages","stargazers_url":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/stargazers","contributors_url":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/contributors","subscribers_url":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/subscribers","subscription_url":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/subscription","commits_url":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/commits{/sha}","git_commits_url":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/git/commits{/sha}","comments_url":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/comments{/number}","issue_comment_url":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/issues/comments{/number}","contents_url":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/contents/{+path}","compare_url":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/compare/{base}...{head}","merges_url":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/merges","archive_url":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/downloads","issues_url":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/issues{/number}","pulls_url":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/pulls{/number}","milestones_url":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/milestones{/number}","notifications_url":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/labels{/name}","releases_url":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/releases{/id}","deployments_url":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/deployments","created_at":"2016-04-08T16:10:36Z","updated_at":"2016-04-13T14:31:44Z","pushed_at":"2016-05-04T14:05:10Z","git_url":"git://github.com/alphagov/specialist-publisher-rebuild.git","ssh_url":"git@github.com:alphagov/specialist-publisher-rebuild.git","clone_url":"https://github.com/alphagov/specialist-publisher-rebuild.git","svn_url":"https://github.com/alphagov/specialist-publisher-rebuild","homepage":"","size":5210,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":7,"forks":0,"open_issues":7,"watchers":0,"default_branch":"master"}},"base":{"label":"alphagov:master","ref":"master","sha":"bb9f666fc4b4f534c54a73ec0f4dc7d86b656589","user":{"login":"alphagov","id":596977,"avatar_url":"https://avatars.githubusercontent.com/u/596977?v=3","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":55792443,"name":"specialist-publisher-rebuild","full_name":"alphagov/specialist-publisher-rebuild","owner":{"login":"alphagov","id":596977,"avatar_url":"https://avatars.githubusercontent.com/u/596977?v=3","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/specialist-publisher-rebuild","description":"Publishing app for specialist documents and manuals on GOV.UK","fork":false,"url":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild","forks_url":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/forks","keys_url":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/keys{/key_id}","collaborators_url":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/teams","hooks_url":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/hooks","issue_events_url":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/issues/events{/number}","events_url":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/events","assignees_url":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/assignees{/user}","branches_url":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/branches{/branch}","tags_url":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/tags","blobs_url":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/git/refs{/sha}","trees_url":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/git/trees{/sha}","statuses_url":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/statuses/{sha}","languages_url":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/languages","stargazers_url":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/stargazers","contributors_url":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/contributors","subscribers_url":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/subscribers","subscription_url":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/subscription","commits_url":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/commits{/sha}","git_commits_url":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/git/commits{/sha}","comments_url":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/comments{/number}","issue_comment_url":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/issues/comments{/number}","contents_url":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/contents/{+path}","compare_url":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/compare/{base}...{head}","merges_url":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/merges","archive_url":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/downloads","issues_url":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/issues{/number}","pulls_url":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/pulls{/number}","milestones_url":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/milestones{/number}","notifications_url":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/labels{/name}","releases_url":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/releases{/id}","deployments_url":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/deployments","created_at":"2016-04-08T16:10:36Z","updated_at":"2016-04-13T14:31:44Z","pushed_at":"2016-05-04T14:05:10Z","git_url":"git://github.com/alphagov/specialist-publisher-rebuild.git","ssh_url":"git@github.com:alphagov/specialist-publisher-rebuild.git","clone_url":"https://github.com/alphagov/specialist-publisher-rebuild.git","svn_url":"https://github.com/alphagov/specialist-publisher-rebuild","homepage":"","size":5210,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":7,"forks":0,"open_issues":7,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/pulls/734"},"html":{"href":"https://github.com/alphagov/specialist-publisher-rebuild/pull/734"},"issue":{"href":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/issues/734"},"comments":{"href":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/issues/734/comments"},"review_comments":{"href":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/pulls/734/comments"},"review_comment":{"href":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/pulls/734/commits"},"statuses":{"href":"https://api.github.com/repos/alphagov/specialist-publisher-rebuild/statuses/6c8d77dd70a5bb8aae2e8c4f7db54e2c2d2d542e"}}}}