{"push_id":671116495,"size":2,"distinct_size":2,"ref":"refs/heads/back-fill-publication-history","head":"b3d54f1053909fce57509cbfa4678886be0d554d","before":"692ab7e6f7c7378b9af856c988625184d23e8577","commits":[{"sha":"492bd1981de24563566834b44ac62b50b9fb33c6","author":{"email":"1960665b789a54413d9da7eaa93a0e5f5b4672af@tekin.co.uk","name":"Tekin Suleyman"},"message":"Add script to rewrite migrated policy publication history\n\nThis script/rewrite_policy_publication_history.rb script will rewrite the\ndocument history on publications that were generated to archive content from\nthe old Policy format.\n\nIt does the following:\n\n\t* Makes a note of the existing change history on the publication\n\t* Clears the publication change history so it starts from a blank-slate\n\t* For every major change on the original policy, re-edition the publication and\n\tuse the change note and public timestamp of the policy major change\n\t* For those changes on the publication that were noted in the first step,\n\tre-edition the publication and adopting the public timestamp of those changes\n\nThis should result in a merge document history on the publication that\nadopts the history of the original policy, followed by subsequent changes for\nthe transition to a publication and any major changes that may have been\nperformed since the publication was initial published.\n\nThe expects all publications to be in a \"published\" state, with no open \"draft\"\nor \"submitted\" editions. Any remaining \"draft\" or \"submitted\" editions should be\neither disgarded or published before running the script as otherwise it will\nfail.\n\nNote that although the script performs the history rewriting in a transaction,\nit is not idempotent and so should only ever be run once, otherwise the history\nwill be duplicated. If the script exists with errors however, the transaction\nwill rollback and the script can be retried.","distinct":true,"url":"https://api.github.com/repos/alphagov/whitehall/commits/492bd1981de24563566834b44ac62b50b9fb33c6"},{"sha":"b3d54f1053909fce57509cbfa4678886be0d554d","author":{"email":"1960665b789a54413d9da7eaa93a0e5f5b4672af@tekin.co.uk","name":"Tekin Suleyman"},"message":"Adjust tests for accuracy\n\nUse Timecop to minimise the chance of timestamps being off.","distinct":true,"url":"https://api.github.com/repos/alphagov/whitehall/commits/b3d54f1053909fce57509cbfa4678886be0d554d"}]}