{"action":"created","comment":{"url":"https://api.github.com/repos/alphagov/content-tagger/pulls/comments/77671514","id":77671514,"diff_hunk":"@@ -0,0 +1,37 @@\n+class BulkTaggingsController < ApplicationController\n+  def new\n+    render :new, locals: { results: [] }\n+  end\n+\n+  def search\n+    if search_response.successful?\n+      warning_about_multiple_pages\n+      render :new, locals: { results: search_response.results }\n+    else\n+      flash[:error] = I18n.t('controllers.bulk_taggins.failure')\n+      render :new, locals: { results: [] }\n+    end\n+  end\n+\n+private\n+\n+  def warning_about_multiple_pages\n+    if search_response.multiple_pages?\n+      flash[:warning] = I18n.t('controllers.bulk_taggings.too_many_results')","path":"app/controllers/bulk_taggings_controller.rb","position":20,"original_position":20,"commit_id":"7ec3e4a0491a462a524b89acf13a9c2f62d120c2","original_commit_id":"7ec3e4a0491a462a524b89acf13a9c2f62d120c2","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":"Don't forget some comment in readme to explain why too much is too much.","created_at":"2016-09-06T16:38:06Z","updated_at":"2016-09-06T16:38:06Z","html_url":"https://github.com/alphagov/content-tagger/pull/151#discussion_r77671514","pull_request_url":"https://api.github.com/repos/alphagov/content-tagger/pulls/151","_links":{"self":{"href":"https://api.github.com/repos/alphagov/content-tagger/pulls/comments/77671514"},"html":{"href":"https://github.com/alphagov/content-tagger/pull/151#discussion_r77671514"},"pull_request":{"href":"https://api.github.com/repos/alphagov/content-tagger/pulls/151"}}},"pull_request":{"url":"https://api.github.com/repos/alphagov/content-tagger/pulls/151","id":84140373,"html_url":"https://github.com/alphagov/content-tagger/pull/151","diff_url":"https://github.com/alphagov/content-tagger/pull/151.diff","patch_url":"https://github.com/alphagov/content-tagger/pull/151.patch","issue_url":"https://api.github.com/repos/alphagov/content-tagger/issues/151","number":151,"state":"open","locked":false,"title":"Bulk migration of tags","user":{"login":"carvil","id":416701,"avatar_url":"https://avatars.githubusercontent.com/u/416701?v=3","gravatar_id":"","url":"https://api.github.com/users/carvil","html_url":"https://github.com/carvil","followers_url":"https://api.github.com/users/carvil/followers","following_url":"https://api.github.com/users/carvil/following{/other_user}","gists_url":"https://api.github.com/users/carvil/gists{/gist_id}","starred_url":"https://api.github.com/users/carvil/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/carvil/subscriptions","organizations_url":"https://api.github.com/users/carvil/orgs","repos_url":"https://api.github.com/users/carvil/repos","events_url":"https://api.github.com/users/carvil/events{/privacy}","received_events_url":"https://api.github.com/users/carvil/received_events","type":"User","site_admin":false},"body":"This PR allows us to:\r\n\r\n- search for a collection;\r\n- select which content items we want to tag;\r\n- select which taxons we want to tag those content items with;\r\n- preview a tag migration;\r\n- bulk-tag all the content items.\r\n\r\n**Note**: Until the publishing API removes the permissions from the `get_content_items` endpoint, we need to add `view_all` permissions to the `dummyapiuser` in development mode in order to see results from the search.\r\n\r\nTrello: https://trello.com/c/9LajM53J/10-epic-bulk-tagging-from-existing-taxonomies-to-the-new-one\r\n\r\nWork done by both myself and @mobaig (the rebase erased some of the commit details).\r\n\r\nWhat's next:\r\n- [ ] support for topics and browse pages\r\n- [ ] tidy up navigation (perhaps merge some functionality into a single navigation item).\r\n\r\nThese will come in separate PRs.","created_at":"2016-09-06T15:09:18Z","updated_at":"2016-09-06T16:38:06Z","closed_at":null,"merged_at":null,"merge_commit_sha":"cd92ac3532420166fa2b9713ba1159b29ad5328b","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/alphagov/content-tagger/pulls/151/commits","review_comments_url":"https://api.github.com/repos/alphagov/content-tagger/pulls/151/comments","review_comment_url":"https://api.github.com/repos/alphagov/content-tagger/pulls/comments{/number}","comments_url":"https://api.github.com/repos/alphagov/content-tagger/issues/151/comments","statuses_url":"https://api.github.com/repos/alphagov/content-tagger/statuses/7ec3e4a0491a462a524b89acf13a9c2f62d120c2","head":{"label":"alphagov:mb-bulk-moving-of-tags","ref":"mb-bulk-moving-of-tags","sha":"7ec3e4a0491a462a524b89acf13a9c2f62d120c2","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":46417722,"name":"content-tagger","full_name":"alphagov/content-tagger","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/content-tagger","description":"Application for tagging content on GOV.UK","fork":false,"url":"https://api.github.com/repos/alphagov/content-tagger","forks_url":"https://api.github.com/repos/alphagov/content-tagger/forks","keys_url":"https://api.github.com/repos/alphagov/content-tagger/keys{/key_id}","collaborators_url":"https://api.github.com/repos/alphagov/content-tagger/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/alphagov/content-tagger/teams","hooks_url":"https://api.github.com/repos/alphagov/content-tagger/hooks","issue_events_url":"https://api.github.com/repos/alphagov/content-tagger/issues/events{/number}","events_url":"https://api.github.com/repos/alphagov/content-tagger/events","assignees_url":"https://api.github.com/repos/alphagov/content-tagger/assignees{/user}","branches_url":"https://api.github.com/repos/alphagov/content-tagger/branches{/branch}","tags_url":"https://api.github.com/repos/alphagov/content-tagger/tags","blobs_url":"https://api.github.com/repos/alphagov/content-tagger/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/alphagov/content-tagger/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/alphagov/content-tagger/git/refs{/sha}","trees_url":"https://api.github.com/repos/alphagov/content-tagger/git/trees{/sha}","statuses_url":"https://api.github.com/repos/alphagov/content-tagger/statuses/{sha}","languages_url":"https://api.github.com/repos/alphagov/content-tagger/languages","stargazers_url":"https://api.github.com/repos/alphagov/content-tagger/stargazers","contributors_url":"https://api.github.com/repos/alphagov/content-tagger/contributors","subscribers_url":"https://api.github.com/repos/alphagov/content-tagger/subscribers","subscription_url":"https://api.github.com/repos/alphagov/content-tagger/subscription","commits_url":"https://api.github.com/repos/alphagov/content-tagger/commits{/sha}","git_commits_url":"https://api.github.com/repos/alphagov/content-tagger/git/commits{/sha}","comments_url":"https://api.github.com/repos/alphagov/content-tagger/comments{/number}","issue_comment_url":"https://api.github.com/repos/alphagov/content-tagger/issues/comments{/number}","contents_url":"https://api.github.com/repos/alphagov/content-tagger/contents/{+path}","compare_url":"https://api.github.com/repos/alphagov/content-tagger/compare/{base}...{head}","merges_url":"https://api.github.com/repos/alphagov/content-tagger/merges","archive_url":"https://api.github.com/repos/alphagov/content-tagger/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/alphagov/content-tagger/downloads","issues_url":"https://api.github.com/repos/alphagov/content-tagger/issues{/number}","pulls_url":"https://api.github.com/repos/alphagov/content-tagger/pulls{/number}","milestones_url":"https://api.github.com/repos/alphagov/content-tagger/milestones{/number}","notifications_url":"https://api.github.com/repos/alphagov/content-tagger/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/alphagov/content-tagger/labels{/name}","releases_url":"https://api.github.com/repos/alphagov/content-tagger/releases{/id}","deployments_url":"https://api.github.com/repos/alphagov/content-tagger/deployments","created_at":"2015-11-18T12:36:10Z","updated_at":"2016-08-13T09:38:36Z","pushed_at":"2016-09-06T15:09:19Z","git_url":"git://github.com/alphagov/content-tagger.git","ssh_url":"git@github.com:alphagov/content-tagger.git","clone_url":"https://github.com/alphagov/content-tagger.git","svn_url":"https://github.com/alphagov/content-tagger","homepage":"https://content-tagger.publishing.service.gov.uk/","size":2688,"stargazers_count":1,"watchers_count":1,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":1,"default_branch":"master"}},"base":{"label":"alphagov:master","ref":"master","sha":"bd1ccf546f4f2f71b2810a412246d150f19172e7","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":46417722,"name":"content-tagger","full_name":"alphagov/content-tagger","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/content-tagger","description":"Application for tagging content on GOV.UK","fork":false,"url":"https://api.github.com/repos/alphagov/content-tagger","forks_url":"https://api.github.com/repos/alphagov/content-tagger/forks","keys_url":"https://api.github.com/repos/alphagov/content-tagger/keys{/key_id}","collaborators_url":"https://api.github.com/repos/alphagov/content-tagger/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/alphagov/content-tagger/teams","hooks_url":"https://api.github.com/repos/alphagov/content-tagger/hooks","issue_events_url":"https://api.github.com/repos/alphagov/content-tagger/issues/events{/number}","events_url":"https://api.github.com/repos/alphagov/content-tagger/events","assignees_url":"https://api.github.com/repos/alphagov/content-tagger/assignees{/user}","branches_url":"https://api.github.com/repos/alphagov/content-tagger/branches{/branch}","tags_url":"https://api.github.com/repos/alphagov/content-tagger/tags","blobs_url":"https://api.github.com/repos/alphagov/content-tagger/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/alphagov/content-tagger/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/alphagov/content-tagger/git/refs{/sha}","trees_url":"https://api.github.com/repos/alphagov/content-tagger/git/trees{/sha}","statuses_url":"https://api.github.com/repos/alphagov/content-tagger/statuses/{sha}","languages_url":"https://api.github.com/repos/alphagov/content-tagger/languages","stargazers_url":"https://api.github.com/repos/alphagov/content-tagger/stargazers","contributors_url":"https://api.github.com/repos/alphagov/content-tagger/contributors","subscribers_url":"https://api.github.com/repos/alphagov/content-tagger/subscribers","subscription_url":"https://api.github.com/repos/alphagov/content-tagger/subscription","commits_url":"https://api.github.com/repos/alphagov/content-tagger/commits{/sha}","git_commits_url":"https://api.github.com/repos/alphagov/content-tagger/git/commits{/sha}","comments_url":"https://api.github.com/repos/alphagov/content-tagger/comments{/number}","issue_comment_url":"https://api.github.com/repos/alphagov/content-tagger/issues/comments{/number}","contents_url":"https://api.github.com/repos/alphagov/content-tagger/contents/{+path}","compare_url":"https://api.github.com/repos/alphagov/content-tagger/compare/{base}...{head}","merges_url":"https://api.github.com/repos/alphagov/content-tagger/merges","archive_url":"https://api.github.com/repos/alphagov/content-tagger/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/alphagov/content-tagger/downloads","issues_url":"https://api.github.com/repos/alphagov/content-tagger/issues{/number}","pulls_url":"https://api.github.com/repos/alphagov/content-tagger/pulls{/number}","milestones_url":"https://api.github.com/repos/alphagov/content-tagger/milestones{/number}","notifications_url":"https://api.github.com/repos/alphagov/content-tagger/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/alphagov/content-tagger/labels{/name}","releases_url":"https://api.github.com/repos/alphagov/content-tagger/releases{/id}","deployments_url":"https://api.github.com/repos/alphagov/content-tagger/deployments","created_at":"2015-11-18T12:36:10Z","updated_at":"2016-08-13T09:38:36Z","pushed_at":"2016-09-06T15:09:19Z","git_url":"git://github.com/alphagov/content-tagger.git","ssh_url":"git@github.com:alphagov/content-tagger.git","clone_url":"https://github.com/alphagov/content-tagger.git","svn_url":"https://github.com/alphagov/content-tagger","homepage":"https://content-tagger.publishing.service.gov.uk/","size":2688,"stargazers_count":1,"watchers_count":1,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/alphagov/content-tagger/pulls/151"},"html":{"href":"https://github.com/alphagov/content-tagger/pull/151"},"issue":{"href":"https://api.github.com/repos/alphagov/content-tagger/issues/151"},"comments":{"href":"https://api.github.com/repos/alphagov/content-tagger/issues/151/comments"},"review_comments":{"href":"https://api.github.com/repos/alphagov/content-tagger/pulls/151/comments"},"review_comment":{"href":"https://api.github.com/repos/alphagov/content-tagger/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/alphagov/content-tagger/pulls/151/commits"},"statuses":{"href":"https://api.github.com/repos/alphagov/content-tagger/statuses/7ec3e4a0491a462a524b89acf13a9c2f62d120c2"}}}}
{"actor":{"display_login":"tijmenb"}}