{"action":"created","comment":{"url":"https://api.github.com/repos/alphagov/manuals-publisher/pulls/comments/119064294","pull_request_review_id":40908443,"id":119064294,"diff_hunk":"@@ -12,6 +12,12 @@ def call\n         manual_id: manual.id,\n         version_number: manual.version_number,\n       )\n+\n+      govuk_header_params = {\n+        request_id: GdsApi::GovukHeaders.headers[:govuk_request_id],\n+        authenticated_user: GdsApi::GovukHeaders.headers[:x_govuk_authenticated_user],\n+      }\n+","path":"app/services/manual/queue_publish_service.rb","position":17,"original_position":9,"commit_id":"cac81f552fbdd7728df29153bdf9d853f206d682","original_commit_id":"0232cf21bc1b91eb2620e07e8496726919d83978","user":{"login":"floehopper","id":3169,"avatar_url":"https://avatars1.githubusercontent.com/u/3169?v=3","gravatar_id":"","url":"https://api.github.com/users/floehopper","html_url":"https://github.com/floehopper","followers_url":"https://api.github.com/users/floehopper/followers","following_url":"https://api.github.com/users/floehopper/following{/other_user}","gists_url":"https://api.github.com/users/floehopper/gists{/gist_id}","starred_url":"https://api.github.com/users/floehopper/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/floehopper/subscriptions","organizations_url":"https://api.github.com/users/floehopper/orgs","repos_url":"https://api.github.com/users/floehopper/repos","events_url":"https://api.github.com/users/floehopper/events{/privacy}","received_events_url":"https://api.github.com/users/floehopper/received_events","type":"User","site_admin":false},"body":"Out-of-scope: I think it would be better to extract these header values within the controller action and pass them into the service as constructor args.","created_at":"2017-05-30T10:32:30Z","updated_at":"2017-05-30T10:42:16Z","html_url":"https://github.com/alphagov/manuals-publisher/pull/1158#discussion_r119064294","pull_request_url":"https://api.github.com/repos/alphagov/manuals-publisher/pulls/1158","_links":{"self":{"href":"https://api.github.com/repos/alphagov/manuals-publisher/pulls/comments/119064294"},"html":{"href":"https://github.com/alphagov/manuals-publisher/pull/1158#discussion_r119064294"},"pull_request":{"href":"https://api.github.com/repos/alphagov/manuals-publisher/pulls/1158"}}},"pull_request":{"url":"https://api.github.com/repos/alphagov/manuals-publisher/pulls/1158","id":122849980,"html_url":"https://github.com/alphagov/manuals-publisher/pull/1158","diff_url":"https://github.com/alphagov/manuals-publisher/pull/1158.diff","patch_url":"https://github.com/alphagov/manuals-publisher/pull/1158.patch","issue_url":"https://api.github.com/repos/alphagov/manuals-publisher/issues/1158","number":1158,"state":"open","locked":false,"title":"Refactor manual services","user":{"login":"chrisroos","id":6556,"avatar_url":"https://avatars1.githubusercontent.com/u/6556?v=3","gravatar_id":"","url":"https://api.github.com/users/chrisroos","html_url":"https://github.com/chrisroos","followers_url":"https://api.github.com/users/chrisroos/followers","following_url":"https://api.github.com/users/chrisroos/following{/other_user}","gists_url":"https://api.github.com/users/chrisroos/gists{/gist_id}","starred_url":"https://api.github.com/users/chrisroos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chrisroos/subscriptions","organizations_url":"https://api.github.com/users/chrisroos/orgs","repos_url":"https://api.github.com/users/chrisroos/repos","events_url":"https://api.github.com/users/chrisroos/events{/privacy}","received_events_url":"https://api.github.com/users/chrisroos/received_events","type":"User","site_admin":false},"body":"I think inlining these methods makes it easier to see the behaviour of the various `#call` methods.","created_at":"2017-05-29T08:32:33Z","updated_at":"2017-05-30T10:42:16Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9b36afabebc664c05ee98f374c85d5c28c3f207c","assignee":null,"assignees":[],"requested_reviewers":[{"login":"chrislo","id":16707,"avatar_url":"https://avatars3.githubusercontent.com/u/16707?v=3","gravatar_id":"","url":"https://api.github.com/users/chrislo","html_url":"https://github.com/chrislo","followers_url":"https://api.github.com/users/chrislo/followers","following_url":"https://api.github.com/users/chrislo/following{/other_user}","gists_url":"https://api.github.com/users/chrislo/gists{/gist_id}","starred_url":"https://api.github.com/users/chrislo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chrislo/subscriptions","organizations_url":"https://api.github.com/users/chrislo/orgs","repos_url":"https://api.github.com/users/chrislo/repos","events_url":"https://api.github.com/users/chrislo/events{/privacy}","received_events_url":"https://api.github.com/users/chrislo/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/alphagov/manuals-publisher/pulls/1158/commits","review_comments_url":"https://api.github.com/repos/alphagov/manuals-publisher/pulls/1158/comments","review_comment_url":"https://api.github.com/repos/alphagov/manuals-publisher/pulls/comments{/number}","comments_url":"https://api.github.com/repos/alphagov/manuals-publisher/issues/1158/comments","statuses_url":"https://api.github.com/repos/alphagov/manuals-publisher/statuses/cac81f552fbdd7728df29153bdf9d853f206d682","head":{"label":"alphagov:refactor-manual-services","ref":"refactor-manual-services","sha":"cac81f552fbdd7728df29153bdf9d853f206d682","user":{"login":"alphagov","id":596977,"avatar_url":"https://avatars3.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":16176198,"name":"manuals-publisher","full_name":"alphagov/manuals-publisher","owner":{"login":"alphagov","id":596977,"avatar_url":"https://avatars3.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/manuals-publisher","description":"Publishes manuals on GOV.UK","fork":false,"url":"https://api.github.com/repos/alphagov/manuals-publisher","forks_url":"https://api.github.com/repos/alphagov/manuals-publisher/forks","keys_url":"https://api.github.com/repos/alphagov/manuals-publisher/keys{/key_id}","collaborators_url":"https://api.github.com/repos/alphagov/manuals-publisher/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/alphagov/manuals-publisher/teams","hooks_url":"https://api.github.com/repos/alphagov/manuals-publisher/hooks","issue_events_url":"https://api.github.com/repos/alphagov/manuals-publisher/issues/events{/number}","events_url":"https://api.github.com/repos/alphagov/manuals-publisher/events","assignees_url":"https://api.github.com/repos/alphagov/manuals-publisher/assignees{/user}","branches_url":"https://api.github.com/repos/alphagov/manuals-publisher/branches{/branch}","tags_url":"https://api.github.com/repos/alphagov/manuals-publisher/tags","blobs_url":"https://api.github.com/repos/alphagov/manuals-publisher/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/alphagov/manuals-publisher/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/alphagov/manuals-publisher/git/refs{/sha}","trees_url":"https://api.github.com/repos/alphagov/manuals-publisher/git/trees{/sha}","statuses_url":"https://api.github.com/repos/alphagov/manuals-publisher/statuses/{sha}","languages_url":"https://api.github.com/repos/alphagov/manuals-publisher/languages","stargazers_url":"https://api.github.com/repos/alphagov/manuals-publisher/stargazers","contributors_url":"https://api.github.com/repos/alphagov/manuals-publisher/contributors","subscribers_url":"https://api.github.com/repos/alphagov/manuals-publisher/subscribers","subscription_url":"https://api.github.com/repos/alphagov/manuals-publisher/subscription","commits_url":"https://api.github.com/repos/alphagov/manuals-publisher/commits{/sha}","git_commits_url":"https://api.github.com/repos/alphagov/manuals-publisher/git/commits{/sha}","comments_url":"https://api.github.com/repos/alphagov/manuals-publisher/comments{/number}","issue_comment_url":"https://api.github.com/repos/alphagov/manuals-publisher/issues/comments{/number}","contents_url":"https://api.github.com/repos/alphagov/manuals-publisher/contents/{+path}","compare_url":"https://api.github.com/repos/alphagov/manuals-publisher/compare/{base}...{head}","merges_url":"https://api.github.com/repos/alphagov/manuals-publisher/merges","archive_url":"https://api.github.com/repos/alphagov/manuals-publisher/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/alphagov/manuals-publisher/downloads","issues_url":"https://api.github.com/repos/alphagov/manuals-publisher/issues{/number}","pulls_url":"https://api.github.com/repos/alphagov/manuals-publisher/pulls{/number}","milestones_url":"https://api.github.com/repos/alphagov/manuals-publisher/milestones{/number}","notifications_url":"https://api.github.com/repos/alphagov/manuals-publisher/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/alphagov/manuals-publisher/labels{/name}","releases_url":"https://api.github.com/repos/alphagov/manuals-publisher/releases{/id}","deployments_url":"https://api.github.com/repos/alphagov/manuals-publisher/deployments","created_at":"2014-01-23T15:21:42Z","updated_at":"2017-04-11T11:27:55Z","pushed_at":"2017-05-30T10:26:57Z","git_url":"git://github.com/alphagov/manuals-publisher.git","ssh_url":"git@github.com:alphagov/manuals-publisher.git","clone_url":"https://github.com/alphagov/manuals-publisher.git","svn_url":"https://github.com/alphagov/manuals-publisher","homepage":"https://docs.publishing.service.gov.uk/apps/manuals-publisher.html","size":6684,"stargazers_count":4,"watchers_count":4,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":11,"mirror_url":null,"open_issues_count":78,"forks":11,"open_issues":78,"watchers":4,"default_branch":"master"}},"base":{"label":"alphagov:master","ref":"master","sha":"8d9878843a8bb6b80405007588d652d8f6b5c05b","user":{"login":"alphagov","id":596977,"avatar_url":"https://avatars3.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":16176198,"name":"manuals-publisher","full_name":"alphagov/manuals-publisher","owner":{"login":"alphagov","id":596977,"avatar_url":"https://avatars3.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/manuals-publisher","description":"Publishes manuals on GOV.UK","fork":false,"url":"https://api.github.com/repos/alphagov/manuals-publisher","forks_url":"https://api.github.com/repos/alphagov/manuals-publisher/forks","keys_url":"https://api.github.com/repos/alphagov/manuals-publisher/keys{/key_id}","collaborators_url":"https://api.github.com/repos/alphagov/manuals-publisher/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/alphagov/manuals-publisher/teams","hooks_url":"https://api.github.com/repos/alphagov/manuals-publisher/hooks","issue_events_url":"https://api.github.com/repos/alphagov/manuals-publisher/issues/events{/number}","events_url":"https://api.github.com/repos/alphagov/manuals-publisher/events","assignees_url":"https://api.github.com/repos/alphagov/manuals-publisher/assignees{/user}","branches_url":"https://api.github.com/repos/alphagov/manuals-publisher/branches{/branch}","tags_url":"https://api.github.com/repos/alphagov/manuals-publisher/tags","blobs_url":"https://api.github.com/repos/alphagov/manuals-publisher/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/alphagov/manuals-publisher/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/alphagov/manuals-publisher/git/refs{/sha}","trees_url":"https://api.github.com/repos/alphagov/manuals-publisher/git/trees{/sha}","statuses_url":"https://api.github.com/repos/alphagov/manuals-publisher/statuses/{sha}","languages_url":"https://api.github.com/repos/alphagov/manuals-publisher/languages","stargazers_url":"https://api.github.com/repos/alphagov/manuals-publisher/stargazers","contributors_url":"https://api.github.com/repos/alphagov/manuals-publisher/contributors","subscribers_url":"https://api.github.com/repos/alphagov/manuals-publisher/subscribers","subscription_url":"https://api.github.com/repos/alphagov/manuals-publisher/subscription","commits_url":"https://api.github.com/repos/alphagov/manuals-publisher/commits{/sha}","git_commits_url":"https://api.github.com/repos/alphagov/manuals-publisher/git/commits{/sha}","comments_url":"https://api.github.com/repos/alphagov/manuals-publisher/comments{/number}","issue_comment_url":"https://api.github.com/repos/alphagov/manuals-publisher/issues/comments{/number}","contents_url":"https://api.github.com/repos/alphagov/manuals-publisher/contents/{+path}","compare_url":"https://api.github.com/repos/alphagov/manuals-publisher/compare/{base}...{head}","merges_url":"https://api.github.com/repos/alphagov/manuals-publisher/merges","archive_url":"https://api.github.com/repos/alphagov/manuals-publisher/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/alphagov/manuals-publisher/downloads","issues_url":"https://api.github.com/repos/alphagov/manuals-publisher/issues{/number}","pulls_url":"https://api.github.com/repos/alphagov/manuals-publisher/pulls{/number}","milestones_url":"https://api.github.com/repos/alphagov/manuals-publisher/milestones{/number}","notifications_url":"https://api.github.com/repos/alphagov/manuals-publisher/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/alphagov/manuals-publisher/labels{/name}","releases_url":"https://api.github.com/repos/alphagov/manuals-publisher/releases{/id}","deployments_url":"https://api.github.com/repos/alphagov/manuals-publisher/deployments","created_at":"2014-01-23T15:21:42Z","updated_at":"2017-04-11T11:27:55Z","pushed_at":"2017-05-30T10:26:57Z","git_url":"git://github.com/alphagov/manuals-publisher.git","ssh_url":"git@github.com:alphagov/manuals-publisher.git","clone_url":"https://github.com/alphagov/manuals-publisher.git","svn_url":"https://github.com/alphagov/manuals-publisher","homepage":"https://docs.publishing.service.gov.uk/apps/manuals-publisher.html","size":6684,"stargazers_count":4,"watchers_count":4,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":11,"mirror_url":null,"open_issues_count":78,"forks":11,"open_issues":78,"watchers":4,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/alphagov/manuals-publisher/pulls/1158"},"html":{"href":"https://github.com/alphagov/manuals-publisher/pull/1158"},"issue":{"href":"https://api.github.com/repos/alphagov/manuals-publisher/issues/1158"},"comments":{"href":"https://api.github.com/repos/alphagov/manuals-publisher/issues/1158/comments"},"review_comments":{"href":"https://api.github.com/repos/alphagov/manuals-publisher/pulls/1158/comments"},"review_comment":{"href":"https://api.github.com/repos/alphagov/manuals-publisher/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/alphagov/manuals-publisher/pulls/1158/commits"},"statuses":{"href":"https://api.github.com/repos/alphagov/manuals-publisher/statuses/cac81f552fbdd7728df29153bdf9d853f206d682"}}}}
{"actor":{"display_login":"floehopper"}}