{"action":"created","comment":{"url":"https://api.github.com/repos/alphagov/whitehall/pulls/comments/57513316","id":57513316,"diff_hunk":"@@ -56,19 +56,22 @@ namespace :publishing_api do\n       $stderr.puts \"Class: #{item.class}; id: #{item.id}; Error: #{err.message}\"\n     end\n \n-    class_name = args[:item_class]\n-    if class_name == 'Edition'\n-      klass = Edition.published\n-    else\n-      klass = class_name.constantize\n-    end\n+    args[:item_classes].split(',').each do |class_name|\n+      if class_name == 'Edition'\n+        editions = Edition.published\n+      else\n+        editions = class_name.constantize.published","path":"lib/tasks/publishing_api.rake","position":23,"original_position":23,"commit_id":"05c703bee56058aa1df7029cea9a2314bbc90621","original_commit_id":"05c703bee56058aa1df7029cea9a2314bbc90621","user":{"login":"tijmenb","id":233676,"avatar_url":"https://avatars.githubusercontent.com/u/233676?v=3","gravatar_id":"","url":"https://api.github.com/users/tijmenb","html_url":"https://github.com/tijmenb","followers_url":"https://api.github.com/users/tijmenb/followers","following_url":"https://api.github.com/users/tijmenb/following{/other_user}","gists_url":"https://api.github.com/users/tijmenb/gists{/gist_id}","starred_url":"https://api.github.com/users/tijmenb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tijmenb/subscriptions","organizations_url":"https://api.github.com/users/tijmenb/orgs","repos_url":"https://api.github.com/users/tijmenb/repos","events_url":"https://api.github.com/users/tijmenb/events{/privacy}","received_events_url":"https://api.github.com/users/tijmenb/received_events","type":"User","site_admin":false},"body":"Checked this, and the only thing on our list that doesn't have a `published` scope is `Policy`.","created_at":"2016-03-26T13:02:12Z","updated_at":"2016-03-26T13:02:12Z","html_url":"https://github.com/alphagov/whitehall/pull/2525#discussion_r57513316","pull_request_url":"https://api.github.com/repos/alphagov/whitehall/pulls/2525","_links":{"self":{"href":"https://api.github.com/repos/alphagov/whitehall/pulls/comments/57513316"},"html":{"href":"https://github.com/alphagov/whitehall/pull/2525#discussion_r57513316"},"pull_request":{"href":"https://api.github.com/repos/alphagov/whitehall/pulls/2525"}}},"pull_request":{"url":"https://api.github.com/repos/alphagov/whitehall/pulls/2525","id":64033066,"html_url":"https://github.com/alphagov/whitehall/pull/2525","diff_url":"https://github.com/alphagov/whitehall/pull/2525.diff","patch_url":"https://github.com/alphagov/whitehall/pull/2525.patch","issue_url":"https://api.github.com/repos/alphagov/whitehall/issues/2525","number":2525,"state":"open","locked":false,"title":"Restrict data processed by the publishing_api:publishing_api_patch_links task","user":{"login":"MatMoore","id":87579,"avatar_url":"https://avatars.githubusercontent.com/u/87579?v=3","gravatar_id":"","url":"https://api.github.com/users/MatMoore","html_url":"https://github.com/MatMoore","followers_url":"https://api.github.com/users/MatMoore/followers","following_url":"https://api.github.com/users/MatMoore/following{/other_user}","gists_url":"https://api.github.com/users/MatMoore/gists{/gist_id}","starred_url":"https://api.github.com/users/MatMoore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MatMoore/subscriptions","organizations_url":"https://api.github.com/users/MatMoore/orgs","repos_url":"https://api.github.com/users/MatMoore/repos","events_url":"https://api.github.com/users/MatMoore/events{/privacy}","received_events_url":"https://api.github.com/users/MatMoore/received_events","type":"User","site_admin":false},"body":"Restrict the data processed by the rake task for sending links to the publishing api.\r\n\r\n* When running on a specific subclass, restrict to published editions\r\n* Allow specifying a comma separated list of class names\r\n* Added some more output to indicate progress","created_at":"2016-03-24T13:26:11Z","updated_at":"2016-03-26T13:02:12Z","closed_at":null,"merged_at":null,"merge_commit_sha":"48b50c80028044ce2e9f72bec1436b8a5905d29a","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/alphagov/whitehall/pulls/2525/commits","review_comments_url":"https://api.github.com/repos/alphagov/whitehall/pulls/2525/comments","review_comment_url":"https://api.github.com/repos/alphagov/whitehall/pulls/comments{/number}","comments_url":"https://api.github.com/repos/alphagov/whitehall/issues/2525/comments","statuses_url":"https://api.github.com/repos/alphagov/whitehall/statuses/05c703bee56058aa1df7029cea9a2314bbc90621","head":{"label":"alphagov:publish-multiple-format-links","ref":"publish-multiple-format-links","sha":"05c703bee56058aa1df7029cea9a2314bbc90621","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":2416064,"name":"whitehall","full_name":"alphagov/whitehall","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/whitehall","description":"Inside Government: how the UK Government works, what it's doing, and how you can get involved.","fork":false,"url":"https://api.github.com/repos/alphagov/whitehall","forks_url":"https://api.github.com/repos/alphagov/whitehall/forks","keys_url":"https://api.github.com/repos/alphagov/whitehall/keys{/key_id}","collaborators_url":"https://api.github.com/repos/alphagov/whitehall/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/alphagov/whitehall/teams","hooks_url":"https://api.github.com/repos/alphagov/whitehall/hooks","issue_events_url":"https://api.github.com/repos/alphagov/whitehall/issues/events{/number}","events_url":"https://api.github.com/repos/alphagov/whitehall/events","assignees_url":"https://api.github.com/repos/alphagov/whitehall/assignees{/user}","branches_url":"https://api.github.com/repos/alphagov/whitehall/branches{/branch}","tags_url":"https://api.github.com/repos/alphagov/whitehall/tags","blobs_url":"https://api.github.com/repos/alphagov/whitehall/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/alphagov/whitehall/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/alphagov/whitehall/git/refs{/sha}","trees_url":"https://api.github.com/repos/alphagov/whitehall/git/trees{/sha}","statuses_url":"https://api.github.com/repos/alphagov/whitehall/statuses/{sha}","languages_url":"https://api.github.com/repos/alphagov/whitehall/languages","stargazers_url":"https://api.github.com/repos/alphagov/whitehall/stargazers","contributors_url":"https://api.github.com/repos/alphagov/whitehall/contributors","subscribers_url":"https://api.github.com/repos/alphagov/whitehall/subscribers","subscription_url":"https://api.github.com/repos/alphagov/whitehall/subscription","commits_url":"https://api.github.com/repos/alphagov/whitehall/commits{/sha}","git_commits_url":"https://api.github.com/repos/alphagov/whitehall/git/commits{/sha}","comments_url":"https://api.github.com/repos/alphagov/whitehall/comments{/number}","issue_comment_url":"https://api.github.com/repos/alphagov/whitehall/issues/comments{/number}","contents_url":"https://api.github.com/repos/alphagov/whitehall/contents/{+path}","compare_url":"https://api.github.com/repos/alphagov/whitehall/compare/{base}...{head}","merges_url":"https://api.github.com/repos/alphagov/whitehall/merges","archive_url":"https://api.github.com/repos/alphagov/whitehall/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/alphagov/whitehall/downloads","issues_url":"https://api.github.com/repos/alphagov/whitehall/issues{/number}","pulls_url":"https://api.github.com/repos/alphagov/whitehall/pulls{/number}","milestones_url":"https://api.github.com/repos/alphagov/whitehall/milestones{/number}","notifications_url":"https://api.github.com/repos/alphagov/whitehall/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/alphagov/whitehall/labels{/name}","releases_url":"https://api.github.com/repos/alphagov/whitehall/releases{/id}","deployments_url":"https://api.github.com/repos/alphagov/whitehall/deployments","created_at":"2011-09-19T15:10:49Z","updated_at":"2016-03-26T09:50:58Z","pushed_at":"2016-03-24T15:55:58Z","git_url":"git://github.com/alphagov/whitehall.git","ssh_url":"git@github.com:alphagov/whitehall.git","clone_url":"https://github.com/alphagov/whitehall.git","svn_url":"https://github.com/alphagov/whitehall","homepage":"https://www.gov.uk/government/","size":248988,"stargazers_count":329,"watchers_count":329,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":137,"mirror_url":null,"open_issues_count":6,"forks":137,"open_issues":6,"watchers":329,"default_branch":"master"}},"base":{"label":"alphagov:master","ref":"master","sha":"6d3f47017f5a47206f24560f8ce372efce9dd097","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":2416064,"name":"whitehall","full_name":"alphagov/whitehall","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/whitehall","description":"Inside Government: how the UK Government works, what it's doing, and how you can get involved.","fork":false,"url":"https://api.github.com/repos/alphagov/whitehall","forks_url":"https://api.github.com/repos/alphagov/whitehall/forks","keys_url":"https://api.github.com/repos/alphagov/whitehall/keys{/key_id}","collaborators_url":"https://api.github.com/repos/alphagov/whitehall/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/alphagov/whitehall/teams","hooks_url":"https://api.github.com/repos/alphagov/whitehall/hooks","issue_events_url":"https://api.github.com/repos/alphagov/whitehall/issues/events{/number}","events_url":"https://api.github.com/repos/alphagov/whitehall/events","assignees_url":"https://api.github.com/repos/alphagov/whitehall/assignees{/user}","branches_url":"https://api.github.com/repos/alphagov/whitehall/branches{/branch}","tags_url":"https://api.github.com/repos/alphagov/whitehall/tags","blobs_url":"https://api.github.com/repos/alphagov/whitehall/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/alphagov/whitehall/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/alphagov/whitehall/git/refs{/sha}","trees_url":"https://api.github.com/repos/alphagov/whitehall/git/trees{/sha}","statuses_url":"https://api.github.com/repos/alphagov/whitehall/statuses/{sha}","languages_url":"https://api.github.com/repos/alphagov/whitehall/languages","stargazers_url":"https://api.github.com/repos/alphagov/whitehall/stargazers","contributors_url":"https://api.github.com/repos/alphagov/whitehall/contributors","subscribers_url":"https://api.github.com/repos/alphagov/whitehall/subscribers","subscription_url":"https://api.github.com/repos/alphagov/whitehall/subscription","commits_url":"https://api.github.com/repos/alphagov/whitehall/commits{/sha}","git_commits_url":"https://api.github.com/repos/alphagov/whitehall/git/commits{/sha}","comments_url":"https://api.github.com/repos/alphagov/whitehall/comments{/number}","issue_comment_url":"https://api.github.com/repos/alphagov/whitehall/issues/comments{/number}","contents_url":"https://api.github.com/repos/alphagov/whitehall/contents/{+path}","compare_url":"https://api.github.com/repos/alphagov/whitehall/compare/{base}...{head}","merges_url":"https://api.github.com/repos/alphagov/whitehall/merges","archive_url":"https://api.github.com/repos/alphagov/whitehall/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/alphagov/whitehall/downloads","issues_url":"https://api.github.com/repos/alphagov/whitehall/issues{/number}","pulls_url":"https://api.github.com/repos/alphagov/whitehall/pulls{/number}","milestones_url":"https://api.github.com/repos/alphagov/whitehall/milestones{/number}","notifications_url":"https://api.github.com/repos/alphagov/whitehall/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/alphagov/whitehall/labels{/name}","releases_url":"https://api.github.com/repos/alphagov/whitehall/releases{/id}","deployments_url":"https://api.github.com/repos/alphagov/whitehall/deployments","created_at":"2011-09-19T15:10:49Z","updated_at":"2016-03-26T09:50:58Z","pushed_at":"2016-03-24T15:55:58Z","git_url":"git://github.com/alphagov/whitehall.git","ssh_url":"git@github.com:alphagov/whitehall.git","clone_url":"https://github.com/alphagov/whitehall.git","svn_url":"https://github.com/alphagov/whitehall","homepage":"https://www.gov.uk/government/","size":248988,"stargazers_count":329,"watchers_count":329,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":137,"mirror_url":null,"open_issues_count":6,"forks":137,"open_issues":6,"watchers":329,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/alphagov/whitehall/pulls/2525"},"html":{"href":"https://github.com/alphagov/whitehall/pull/2525"},"issue":{"href":"https://api.github.com/repos/alphagov/whitehall/issues/2525"},"comments":{"href":"https://api.github.com/repos/alphagov/whitehall/issues/2525/comments"},"review_comments":{"href":"https://api.github.com/repos/alphagov/whitehall/pulls/2525/comments"},"review_comment":{"href":"https://api.github.com/repos/alphagov/whitehall/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/alphagov/whitehall/pulls/2525/commits"},"statuses":{"href":"https://api.github.com/repos/alphagov/whitehall/statuses/05c703bee56058aa1df7029cea9a2314bbc90621"}}}}