alphagov/publisher — pull request #315 by JordanHatch (2014-11-27 17:25:38+00:00)
Title: Add scripts and Rake tasks to retag content with CSVs

https://www.pivotaltracker.com/story/show/83308886

To help retag content when topics and sub-topics change, this pull request adds scripts and corresponding Rake tasks, to Publisher.

The `TopicChanges::Preparer` class, when given a source and destination topic, will write a CSV of proposed slugs which should be retagged with the destination topic. The CSV format is being used to help us keep better logs of which changes we're making, and to make batch re-tagging operations repeatable in case of failure.

The data in the CSV can then be provided to the `TopicChanges::Processor` class, which will replace topics in the `primary_topic` or `additional_topics` fields in all non-archived editions matching the slug. After editions have been modified, the existing `PublishedSlugRegisterer` class is used to republish the appropriate published edition to Panopticon and the Publishing API.