{"action":"created","comment":{"url":"https://api.github.com/repos/alphagov/whitehall/pulls/comments/232702909","pull_request_review_id":173956879,"id":232702909,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzMjcwMjkwOQ==","diff_hunk":"@@ -0,0 +1,327 @@\n+# add to list without duplicating\n+def add_to_list(list, val)\n+  list << val unless list.include? val\n+end\n+\n+new = Organisation.find_by(slug: 'rural-payments-agency')\n+old = Organisation.find_by(slug: 'natural-england')\n+\n+# slugs, from zendesk ticket:\n+[\n+  'woodland-capital-grants-2015-fencing-fg1',\n+  'woodland-capital-grants-2015-wooden-field-gate-or-wooden-wings-fg12',\n+  'woodland-capital-grants-2015-badger-gate-fg14',\n+  'woodland-capital-grants-2015-water-gates-fg15',\n+  'woodland-capital-grants-2015-sheep-netting-fg2',\n+  'woodland-capital-grants-2015-rabbit-fencing-supplement-fg4',\n+  'woodland-capital-grants-2015-fencing-supplement-difficult-site-fg5',\n+  'woodland-capital-grants-2015-deer-fencing-fg9',\n+  'woodland-capital-grants-2015-woodland-management-plan-pa3',\n+  'woodland-capital-grants-2015-rhododendron-control-sb6',\n+  'woodland-capital-grants-2015-tree-planting-te4',\n+  'woodland-capital-grants-2015-individual-tree-shelter-te5',\n+  'woodland-capital-grants-2015-woodland-creation-maintenance-payment-wd1',\n+  'woodland-capital-grants-2015-scrub-control-and-felling-diseased-trees-sb1',\n+  'environmental-stewardship-educational-access-visits-on-your-land',\n+  'woodland-capital-grants-2015-choose-options',\n+  'countryside-stewardship-update-land-parcel-records-before-applying',\n+  'cross-compliance-2016',\n+  'catchment-sensitive-farming-reduce-agricultural-water-pollution',\n+  'cross-compliance-2018',\n+  'environmental-stewardship-how-to-get-paid-under-your-agreement',\n+  'changes-to-digital-maps-that-may-affect-stewardship-and-forestry-scheme-agreements',\n+  'countryside-stewardship-and-environmental-stewardship-inspection',\n+  'digital-maps-in-the-rural-payments-service-check-and-change-mapping-updates',\n+  'create-a-woodland-management-plan',\n+  'environmental-stewardship',\n+  'cross-compliance-2017',\n+  'rural-land-register',\n+  'common-agricultural-policy-reform',\n+  'countryside-stewardship-statements-of-priorities',\n+  'capital-items-countryside-stewardship-woodland-capital-grants-2015',\n+  'cross-compliance',\n+  'countryside-stewardship-woodland-support',\n+  'countryside-stewardship-facilitation-funding',\n+  'countryside-stewardship-information-for-agreement-holders',\n+  'environmental-stewardship-guidance-and-forms-for-existing-agreement-holders',\n+  'countryside-stewardship-forms',\n+  'countryside-stewardship-get-paid-for-environmental-land-management',\n+  'wildlife-offers-countryside-stewardship',\n+  'environmental-stewardship-shared-grazing-and-common-land',\n+  'higher-level-stewardship-source-of-british-native-origin-seed',\n+  'environmental-stewardship-agent-authorisation',\n+  'environmental-stewardship-supplementary-land-ownership-and-control',\n+  'countryside-stewardship-hs6-and-hs7-structural-maintenance-plan-and-record-forms',\n+  'countryside-stewardship-ponds-for-wildlife-and-historic-interest-assessment',\n+  'countryside-stewardship-farm-facts-template',\n+  'woodland-management-plans-and-tree-health-support-change-ownership',\n+  'woodland-management-plans-and-tree-health-support-change-an-agreement',\n+  'countryside-stewardship-organic-viability-plan',\n+  'countryside-stewardship-land-ownership-and-control-form',\n+  'countryside-stewardship-consent-for-soil-sampling-on-scheduled-monuments',\n+  'countryside-stewardship-ditch-dyke-and-rhine-restoration-assessment',\n+  'woodland-management-plans-and-tree-health-support-claim-a-payment',\n+  'countryside-stewardship-building-wildlife-assessment',\n+  'countryside-stewardship-building-maintenance-plan-and-log',\n+  'minor-change-notice-for-entry-level-stewardship-agreements',\n+  'minor-change-request-for-higher-level-stewardship-agreements',\n+  'countryside-stewardship-common-land-and-shared-grazing-supplementary-application',\n+  'countryside-stewardship-farm-visit-evaluation',\n+  'environmental-stewardship-livestock-record-keeping',\n+  'countryside-stewardship-livestock-record-keeping',\n+  'vat-declaration-for-higher-level-stewardship-agreement-holders',\n+  'countryside-stewardship-runoff-and-soil-erosion-risk-assessment',\n+  'farming-ammonia-reduction-grant-scheme-claim-form-and-offer-terms',\n+  'countryside-stewardship-capital-grant-application-form',\n+  'minor-and-temporary-adjustment-mta-form-countryside-stewardship',\n+  'countryside-stewardship-permanent-grassland-with-very-low-input-options',\n+  'check-evidence-and-record-keeping-requirements-countryside-stewardship',\n+  'countryside-stewardship-facilitation-fund-claim-a-grant-and-record-progress',\n+  'rural-payments-registering-and-updating-your-details',\n+  'environmental-stewardship-for-heritage-properties',\n+  'cap-reform-how-we-will-manage-double-funding-greening-and-environmental-stewardship',\n+  'common-agricultural-policy-introduction-to-the-new-cap-schemes',\n+  'cap-reform-august-2014-update-including-greening-how-it-works',\n+  'cap-reform-october-2014-update',\n+  'cap-reform-december-2014-update',\n+  'cap-reform-february-2015-update',\n+  'countryside-stewardship-common-land-and-shared-grazing-supplement',\n+  'countryside-stewardship-statement-of-priorities-arden-nca097',\n+  'countryside-stewardship-statement-of-priorities-avon-vales-nca117',\n+  'countryside-stewardship-statement-of-priorities-bedfordshire-and-cambridgeshire-claylands-nca088',\n+  'countryside-stewardship-statement-of-priorities-bedfordshire-greensand-ridge-nca090',\n+  'countryside-stewardship-statement-of-priorities-berkshire-and-marlborough-downs-nca116',\n+  'countryside-stewardship-statement-of-priorities-black-mountains-and-golden-valley-nca099',\n+  'countryside-stewardship-statement-of-priorities-blackdowns-nca147',\n+  'countryside-stewardship-statement-of-priorities-blackmoor-vale-and-the-vale-of-wardour-nca133',\n+  'countryside-stewardship-statement-of-priorities-bodmin-moor-nca153',\n+  'countryside-stewardship-statement-of-priorities-border-moors-and-forests-nca005',\n+  'countryside-stewardship-statement-of-priorities-bowland-fells-nca034',\n+  'countryside-stewardship-statement-of-priorities-bowland-fringe-and-pendle-hill-nca033',\n+  'countryside-stewardship-statement-of-priorities-the-brecks-nca085',\n+  'countryside-stewardship-statement-of-priorities-bristol-avon-valleys-and-ridges-nca118',\n+  'countryside-stewardship-statement-of-priorities-cannock-chase-and-cank-wood-nca067',\n+  'countryside-stewardship-statement-of-priorities-carnmenellis-nca155',\n+  'countryside-stewardship-statement-of-priorities-lincolnshire-central-vale-nca044',\n+  'countryside-stewardship-statement-of-priorities-central-north-norfolk-nca078',\n+  'countryside-stewardship-statement-of-priorities-charnwood-nca073',\n+  'countryside-stewardship-statement-of-priorities-cheshire-sandstone-ridge-nca062',\n+  'countryside-stewardship-statement-of-priorities-cheviot-fringe-nca003',\n+  'countryside-stewardship-statement-of-priorities-cheviots-nca004',\n+  'countryside-stewardship-statement-of-priorities-chilterns-nca110',\n+  'countryside-stewardship-statement-of-priorities-clun-and-north-west-herefordshire-hills-nca098',\n+  'countryside-stewardship-statement-of-priorities-cornish-killas-nca152',\n+  'countryside-stewardship-statement-of-priorities-cotswolds-nca107',\n+  'countryside-stewardship-statement-of-priorities-cumbria-high-fells-nca008',\n+  'countryside-stewardship-statement-of-priorities-dark-peak-nca051',\n+  'countryside-stewardship-statement-of-priorities-dartmoor-nca150',\n+  'countryside-stewardship-statement-of-priorities-derbyshire-peak-fringe-nca050',\n+  'countryside-stewardship-statement-of-priorities-devon-redlands-nca148',\n+  'countryside-stewardship-statement-of-priorities-dorset-downs-and-cranborne-chase-nca134',\n+  'countryside-stewardship-statement-of-priorities-dorset-heaths-nca135',\n+  'countryside-stewardship-statement-of-priorities-dunsmore-and-feldon-nca096',\n+  'countryside-stewardship-statement-of-priorities-durham-coalfield-pennine-fringe-nca016',\n+  'countryside-stewardship-statement-of-priorities-durham-magnesian-limestone-plateau-nca015',\n+  'countryside-stewardship-statement-of-priorities-east-anglian-chalk-nca087',\n+  'countryside-stewardship-statement-of-priorities-eden-valley-nca009',\n+  'countryside-stewardship-statement-of-priorities-exmoor-nca145',\n+  'countryside-stewardship-statement-of-priorities-forest-of-dean-and-lower-wye-nca105',\n+  'countryside-stewardship-statement-of-priorities-greater-thames-estuary-nca081',\n+  'countryside-stewardship-statement-of-priorities-hampshire-downs-nca130',\n+  'countryside-stewardship-priority-statement-hensbarrow-nca154',\n+  'countryside-stewardship-statement-of-priorities-herefordshire-lowlands-nca100',\n+  'countryside-stewardship-statement-of-priorities-herefordshire-plateau-nca101',\n+  'countryside-stewardship-statement-of-priorities-high-leicestershire-nca093',\n+  'countryside-stewardship-statement-of-priorities-high-weald-nca122',\n+  'countryside-stewardship-statement-of-priorities-holderness-nca040',\n+  'countryside-stewardship-statement-of-priorities-howardian-hills-nca029',\n+  'countryside-stewardship-statement-of-priorities-howgill-fells-nca018',\n+  'countryside-stewardship-statement-of-priorities-humber-estuary-nca041',\n+  'countryside-stewardship-statement-of-priorities-humberhead-levels-nca039',\n+  'countryside-stewardship-statement-of-priorities-inner-london-nca112',\n+  'countryside-stewardship-statement-of-priorities-isle-of-portland-nca137',\n+  'countryside-stewardship-statement-of-priorities-isle-of-wight-nca127',\n+  'countryside-stewardship-priority-statement-isles-of-scilly-nca158',\n+  'countryside-stewardship-statement-of-priorities-kesteven-uplands-nca075',\n+  'countryside-stewardship-statement-of-priorities-lancashire-and-amounderness-plain-nca032',\n+  'countryside-stewardship-statement-of-priorities-lancashire-coal-measures-nca056',\n+  'countryside-stewardship-statement-of-priorities-lancashire-valleys-nca035',\n+  'countryside-stewardship-statement-of-priorities-leicestershire-and-nottinghamshire-wolds-nca074',\n+  'countryside-stewardship-statement-of-priorities-leicestershire-and-south-derbyshire-coalfields-nca071',\n+  'countryside-stewardship-statement-of-priorities-leicestershire-vales-nca094',\n+  'countryside-stewardship-statement-of-priorities-lincolnshire-coast-and-marshes-nca042',\n+  'countryside-stewardship-statement-of-priorities-lincolnshire-wolds-nca043',\n+  'countryside-stewardship-statement-of-priorities-low-weald-nca121',\n+  'countryside-stewardship-statement-of-priorities-lundy-nca159',\n+  'countryside-stewardship-statement-of-priorities-malvern-hills-nca103',\n+  'countryside-stewardship-statement-of-priorities-manchester-conurbation-nca055',\n+  'countryside-stewardship-statement-of-priorities-manchester-pennine-fringe-nca054',\n+  'countryside-stewardship-statement-of-priorities-marshwood-and-powerstock-vales-nca139',\n+  'countryside-stewardship-statement-of-priorities-mease-and-sence-lowlands-nca072',\n+  'countryside-stewardship-statement-of-priorities-melbourne-parklands-nca070',\n+  'countryside-stewardship-statement-of-priorities-mendip-hills-nca141',\n+  'countryside-stewardship-statement-of-priorities-merseyside-valley-nca060',\n+  'countryside-stewardship-statement-of-priorities-merseyside-conurbation-nca058',\n+  'countryside-stewardship-statement-of-priorities-mid-norfolk-nca084',\n+  'countryside-stewardship-statement-of-priorities-mid-northumberland-nca012',\n+  'countryside-stewardship-statement-of-priorities-mid-severn-sandstone-plateau-nca066',\n+  'countryside-stewardship-statement-of-priorities-mid-somerset-hills-nca143',\n+  'countryside-stewardship-statement-of-priorities-midvale-ridge-nca109',\n+  'countryside-stewardship-statement-of-priorities-morecambe-bay-limestones-nca020',\n+  'countryside-stewardship-statement-of-priorities-morecambe-coast-lune-estuary-nca031',\n+  'countryside-stewardship-statement-of-priorities-needwood-and-south-derbyshire-claylands-nca068',\n+  'countryside-stewardship-statement-of-priorities-new-forest-nca131',\n+  'countryside-stewardship-statement-of-priorities-north-downs-nca119',\n+  'countryside-stewardship-statement-of-priorities-north-east-norfolk-and-flegg-nca079',\n+  'countryside-stewardship-statement-of-priorities-north-kent-plain-nca113',\n+  'countryside-stewardship-statement-of-priorities-north-norfolk-coast-nca077',\n+  'countryside-stewardship-statement-of-priorities-north-northumberland-coastal-plain-nca001',\n+  'countryside-stewardship-statement-of-priorities-north-pennines-nca010',\n+  'countryside-stewardship-statement-of-priorities-north-west-norfolk-nca076',\n+  'countryside-stewardship-statement-of-priorities-north-york-moors-and-cleveland-hills-nca025',\n+  'countryside-stewardship-statement-of-priorities-northamptonshire-uplands-nca095',\n+  'countryside-stewardship-statement-of-priorities-northamptonshire-vales-nca089',\n+  'countryside-stewardship-statement-of-priorities-northern-lincolnshire-edge-with-coversands-nca045',\n+  'countryside-stewardship-statement-of-priorities-northern-thames-basin-nca111',\n+  'countryside-stewardship-statement-of-priorities-northumberland-sandstone-hills-nca002',\n+  'countryside-stewardship-statement-of-priorities-orton-fells-nca017',\n+  'countryside-stewardship-statement-of-priorities-oswestry-uplands-nca063',\n+  'countryside-stewardship-statement-of-priorities-pennine-dales-fringe-nca022',\n+  'countryside-stewardship-statement-of-priorities-pevensey-levels-nca124',\n+  'countryside-stewardship-statement-of-priorities-potteries-and-churnet-valley-nca064',\n+  'countryside-stewardship-statement-of-priorities-rockingham-forest-nca092',\n+  'countryside-stewardship-statement-of-priorities-quantock-hills-nca144',\n+  'countryside-stewardship-statement-of-priorities-romney-marsh-nca123',\n+  'countryside-stewardship-statement-of-priorities-salisbury-plain-and-west-wiltshire-downs-nca132',\n+  'countryside-stewardship-statement-of-priorities-nottinghamshire-derbyshire-and-yorkshire-coalfields-nca038',\n+  'countryside-stewardship-statement-of-priorities-sefton-coast-nca057',\n+  'countryside-stewardship-statement-of-priorities-severn-and-avon-vales-nca106',\n+  'countryside-stewardship-statement-of-priorities-sherwood-nca049',\n+  'countryside-stewardship-statement-of-priorities-shropshire-hills-nca065',\n+  'countryside-stewardship-statement-of-priorities-shropshire-cheshire-and-staffordshire-plain-nca061',\n+  'countryside-stewardship-statement-of-priorities-solway-basin-nca006',\n+  'countryside-stewardship-statement-of-priorities-somerset-levels-and-moors-nca142',\n+  'countryside-stewardship-statement-of-priorities-south-coast-plain-nca126',\n+  'countryside-stewardship-statement-of-priorities-south-cumbria-low-fells-nca019',\n+  'countryside-stewardship-priority-statement-south-devon-nca151',\n+  'countryside-stewardship-statement-of-priorities-south-downs-nca125',\n+  'countryside-stewardship-statement-of-priorities-south-east-northumberland-coastal-plain-nca013',\n+  'countryside-stewardship-statement-of-priorities-south-hampshire-lowlands-nca128',\n+  'countryside-stewardship-statement-of-priorities-south-herefordshire-and-over-severn-nca104',\n+  'countryside-stewardship-statement-of-priorities-south-norfolk-and-high-suffolk-claylands-nca083',\n+  'countryside-stewardship-statement-of-priorities-south-purbeck-nca136',\n+  'countryside-stewardship-statement-of-priorities-south-suffolk-north-essex-clayland-nca086',\n+  'countryside-stewardship-statement-of-priorities-south-west-peak-nca053',\n+  'countryside-stewardship-statement-of-priorities-southern-lincolnshire-edge-nca047',\n+  'countryside-stewardship-statement-of-priorities-southern-magnesian-limestone-nca030',\n+  'countryside-stewardship-statement-of-priorities-southern-pennines-nca036',\n+  'countryside-stewardship-statement-of-priorities-suffolk-coast-heaths-nca082',\n+  'countryside-stewardship-statement-of-priorities-tees-lowlands-nca023',\n+  'countryside-stewardship-statement-of-priorities-teme-valley-nca102',\n+  'countryside-stewardship-statement-of-priorities-thames-basin-heaths-nca129',\n+  'countryside-stewardship-statement-of-priorities-thames-basin-lowlands-nca114',\n+  'countryside-stewardship-statement-of-priorities-thames-valley-nca115',\n+  'countryside-stewardship-statement-of-priorities-the-broads-nca080',\n+  'countryside-stewardship-statement-of-priorities-the-culm-nca149',\n+  'countryside-stewardship-statement-of-priorities-the-fens-nca046',\n+  'countryside-stewardship-statement-of-priorities-the-lizard-nca157',\n+  'countryside-stewardship-statement-of-priorities-trent-and-belvoir-vales-nca048',\n+  'countryside-stewardship-statement-of-priorities-trent-valley-washlands-nca069',\n+  'countryside-stewardship-statement-of-priorities-tyne-and-wear-lowlands-nca014',\n+  'countryside-stewardship-statement-of-priorities-tyne-gap-and-hadrians-wall-nca011',\n+  'countryside-stewardship-statement-of-priorities-wealden-greensand-nca120',\n+  'countryside-stewardship-statement-of-priorities-upper-thames-clay-vales-nca108',\n+  'countryside-stewardship-statement-of-priorities-vale-of-mowbray-nca024',\n+  'countryside-stewardship-statement-of-priorities-vale-of-pickering-nca026',\n+  'countryside-stewardship-statement-of-priorities-vale-of-taunton-and-quantock-fringes-nca146',\n+  'countryside-stewardship-statement-of-priorities-vale-of-york-nca028',\n+  'countryside-stewardship-statement-of-priorities-west-cumbria-coastal-plain-nca007',\n+  'countryside-stewardship-statement-of-priorities-west-penwith-nca156',\n+  'countryside-stewardship-statement-of-priorities-weymouth-lowlands-nca138',\n+  'countryside-stewardship-statement-of-priorities-white-peak-nca052',\n+  'countryside-stewardship-statement-of-priorities-wirral-nca059',\n+  'countryside-stewardship-statement-of-priorities-yardley-whittlewood-ridge-nca091',\n+  'countryside-stewardship-statement-of-priorities-yeovil-scarplands-nca140',\n+  'countryside-stewardship-statement-of-priorities-yorkshire-dales-nca021',\n+  'countryside-stewardship-statement-of-priorities-yorkshire-southern-pennine-fringe-nca037',\n+  'countryside-stewardship-statement-of-priorities-yorkshire-wolds-nca027',\n+  'countryside-stewardship-inheritance-tax-or-capital-gains-exemption',\n+  'guide-to-countryside-stewardship-water-capital-grants-2015',\n+  'guide-to-countryside-stewardship-woodland-capital-grants-2015',\n+  'cross-compliance-guidance-for-2015',\n+  'countryside-stewardship-farm-wildlife-package',\n+  'environmental-stewardship-additions-transfers-and-option-changes-to-existing-agreements',\n+  'countryside-stewardship-hedgerows-and-boundaries-grant-manual-2017',\n+  'countryside-stewardship-woodland-creation-grant-manual-2017',\n+  'countryside-stewardship-woodland-creation-grant-manual-2016',\n+  'hedgerows-and-boundaries-grant-manual-2017-countryside-stewardship',\n+  'countryside-stewardship-hedgerows-and-boundaries-grant-manual-2016',\n+  'guide-to-countryside-stewardship-facilitation-fund',\n+  'countryside-stewardship-woodland-management-plan-grant-manual-2017',\n+  'countryside-stewardship-woodland-creation-grant-manual-2018',\n+  'high-speed-two-hs2-how-it-affects-agri-environment-scheme-agreements',\n+  'countryside-stewardship-woodland-tree-health-grant-manual-2017',\n+  'woodland-tree-health-grant-countryside-stewardship',\n+  'southern-north-sea-marine-area-index-map-and-site-packages',\n+  'hedgerows-and-boundaries-grant-countryside-stewardship',\n+  'water-environment-grant-weg-handbooks-guidance-and-forms',\n+  'woodland-management-plan-grant-countryside-stewardship',\n+  'annex-8-of-mid-tier-and-new-countryside-stewardship-offers-for-wildlife-manual',\n+  'countryside-stewardship-how-to-submit-claims-online',\n+  'hot-and-dry-weather-conditions-in-england',\n+  'historic-buildings-restoration-grant-countryside-stewardship',\n+  'catchment-sensitive-farming-officer-contacts',\n+  'countryside-stewardship-manual-and-grants-1-january-2016-agreements',\n+  'countryside-stewardship-mid-tier-including-water-quality-capital-items-manual-for-1-january-2017-agreements',\n+  'countryside-stewardship-higher-tier-manual-for-1-january-2017-agreements',\n+  'mid-tier-manual-for-1-january-2018-agreements-countryside-stewardship',\n+  'higher-tier-manual-for-1-january-2018-agreements-countryside-stewardship',\n+  'countryside-stewardship-higher-tier-manual',\n+  'countryside-stewardship-mid-tier-including-water-quality-capital-items-manual',\n+  'arable-offer-countryside-stewardship',\n+  'lowland-grazing-offer-countryside-stewardship',\n+  'mixed-farming-offer-countryside-stewardship',\n+  'upland-offer-countryside-stewardship',\n+  'countryside-stewardship-facilitation-fund-successful-applications',\n+  'countryside-stewardship-facilitation-fund-successful-applications-in-round-2',\n+  'countryside-stewardship-facilitation-fund-successful-applications-in-2017-floods-round',\n+  'facilitation-fund-successful-applications-in-2017-national-round',\n+  'countryside-stewardship-flood-reduction-infographic',\n+  'countryside-stewardship-facilitation-fund-case-studies',\n+  'mid-tier-events-2018-countryside-stewardship',\n+  'tell-the-rural-payments-agency-about-land-changes-and-entitlement-transfers',\n+].each do |slug|\n+  begin\n+    document = Document.find_by(slug: slug)\n+    edition = document.latest_edition\n+\n+    lead_organisations = edition.lead_organisations.to_a\n+    supporting_organisations = edition.supporting_organisations.to_a\n+\n+    # replace `old` with `new` in the lead and supporting orgs; if\n+    # `old` is lead and `new` is supporting, then this will \"promote\"\n+    # `new` to lead.\n+    if lead_organisations.include? old\n+      add_to_list(lead_organisations, new)\n+      supporting_organisations.delete new","path":"db/data_migration/20181112120518_rural_payments_agency.rb","position":306,"original_position":306,"commit_id":"1a98d049b2aa1f473af140b4171dad52150fb279","original_commit_id":"1a98d049b2aa1f473af140b4171dad52150fb279","user":{"login":"barrucadu","id":75235,"node_id":"MDQ6VXNlcjc1MjM1","avatar_url":"https://avatars0.githubusercontent.com/u/75235?v=4","gravatar_id":"","url":"https://api.github.com/users/barrucadu","html_url":"https://github.com/barrucadu","followers_url":"https://api.github.com/users/barrucadu/followers","following_url":"https://api.github.com/users/barrucadu/following{/other_user}","gists_url":"https://api.github.com/users/barrucadu/gists{/gist_id}","starred_url":"https://api.github.com/users/barrucadu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/barrucadu/subscriptions","organizations_url":"https://api.github.com/users/barrucadu/orgs","repos_url":"https://api.github.com/users/barrucadu/repos","events_url":"https://api.github.com/users/barrucadu/events{/privacy}","received_events_url":"https://api.github.com/users/barrucadu/received_events","type":"User","site_admin":false},"body":"You're right, I think the other case should be `elsif supporting_organisations.include?(old) && !lead_organisations.include?(new)`.  Otherwise, in the situation where `new` is in `lead_organisations` and `old` is in `supporting_organisations` we'll end up with `new` in both.","created_at":"2018-11-12T15:32:46Z","updated_at":"2018-11-12T15:32:46Z","html_url":"https://github.com/alphagov/whitehall/pull/4488#discussion_r232702909","pull_request_url":"https://api.github.com/repos/alphagov/whitehall/pulls/4488","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/alphagov/whitehall/pulls/comments/232702909"},"html":{"href":"https://github.com/alphagov/whitehall/pull/4488#discussion_r232702909"},"pull_request":{"href":"https://api.github.com/repos/alphagov/whitehall/pulls/4488"}},"in_reply_to_id":232700822},"pull_request":{"url":"https://api.github.com/repos/alphagov/whitehall/pulls/4488","id":230140163,"node_id":"MDExOlB1bGxSZXF1ZXN0MjMwMTQwMTYz","html_url":"https://github.com/alphagov/whitehall/pull/4488","diff_url":"https://github.com/alphagov/whitehall/pull/4488.diff","patch_url":"https://github.com/alphagov/whitehall/pull/4488.patch","issue_url":"https://api.github.com/repos/alphagov/whitehall/issues/4488","number":4488,"state":"open","locked":false,"title":"Retag selected Natural England content to the Rural Payments Agency","user":{"login":"barrucadu","id":75235,"node_id":"MDQ6VXNlcjc1MjM1","avatar_url":"https://avatars0.githubusercontent.com/u/75235?v=4","gravatar_id":"","url":"https://api.github.com/users/barrucadu","html_url":"https://github.com/barrucadu","followers_url":"https://api.github.com/users/barrucadu/followers","following_url":"https://api.github.com/users/barrucadu/following{/other_user}","gists_url":"https://api.github.com/users/barrucadu/gists{/gist_id}","starred_url":"https://api.github.com/users/barrucadu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/barrucadu/subscriptions","organizations_url":"https://api.github.com/users/barrucadu/orgs","repos_url":"https://api.github.com/users/barrucadu/repos","events_url":"https://api.github.com/users/barrucadu/events{/privacy}","received_events_url":"https://api.github.com/users/barrucadu/received_events","type":"User","site_admin":false},"body":"List of slugs from the spreadsheet in\r\nhttps://govuk.zendesk.com/agent/tickets/3115668\r\n\r\nIt's been a while since the request came in, so some of these have\r\nbeen manually retagged.\r\n\r\n---\r\n\r\nI'll run this on integration before merging.","created_at":"2018-11-12T13:48:26Z","updated_at":"2018-11-12T15:32:46Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f83a987cea91264216c1fedf894a03a9b939250a","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/alphagov/whitehall/pulls/4488/commits","review_comments_url":"https://api.github.com/repos/alphagov/whitehall/pulls/4488/comments","review_comment_url":"https://api.github.com/repos/alphagov/whitehall/pulls/comments{/number}","comments_url":"https://api.github.com/repos/alphagov/whitehall/issues/4488/comments","statuses_url":"https://api.github.com/repos/alphagov/whitehall/statuses/1a98d049b2aa1f473af140b4171dad52150fb279","head":{"label":"alphagov:msw/rpa","ref":"msw/rpa","sha":"1a98d049b2aa1f473af140b4171dad52150fb279","user":{"login":"alphagov","id":596977,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU5Njk3Nw==","avatar_url":"https://avatars0.githubusercontent.com/u/596977?v=4","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,"node_id":"MDEwOlJlcG9zaXRvcnkyNDE2MDY0","name":"whitehall","full_name":"alphagov/whitehall","private":false,"owner":{"login":"alphagov","id":596977,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU5Njk3Nw==","avatar_url":"https://avatars0.githubusercontent.com/u/596977?v=4","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},"html_url":"https://github.com/alphagov/whitehall","description":"Publishes government content on GOV.UK","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":"2018-11-09T09:23:17Z","pushed_at":"2018-11-12T15:09:12Z","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://docs.publishing.service.gov.uk/apps/whitehall.html","size":159891,"stargazers_count":501,"watchers_count":501,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":171,"mirror_url":null,"archived":false,"open_issues_count":26,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":171,"open_issues":26,"watchers":501,"default_branch":"master"}},"base":{"label":"alphagov:master","ref":"master","sha":"46547369b8e0f1c8cce4735dc54453812493467e","user":{"login":"alphagov","id":596977,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU5Njk3Nw==","avatar_url":"https://avatars0.githubusercontent.com/u/596977?v=4","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,"node_id":"MDEwOlJlcG9zaXRvcnkyNDE2MDY0","name":"whitehall","full_name":"alphagov/whitehall","private":false,"owner":{"login":"alphagov","id":596977,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU5Njk3Nw==","avatar_url":"https://avatars0.githubusercontent.com/u/596977?v=4","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},"html_url":"https://github.com/alphagov/whitehall","description":"Publishes government content on GOV.UK","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":"2018-11-09T09:23:17Z","pushed_at":"2018-11-12T15:09:12Z","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://docs.publishing.service.gov.uk/apps/whitehall.html","size":159891,"stargazers_count":501,"watchers_count":501,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":171,"mirror_url":null,"archived":false,"open_issues_count":26,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":171,"open_issues":26,"watchers":501,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/alphagov/whitehall/pulls/4488"},"html":{"href":"https://github.com/alphagov/whitehall/pull/4488"},"issue":{"href":"https://api.github.com/repos/alphagov/whitehall/issues/4488"},"comments":{"href":"https://api.github.com/repos/alphagov/whitehall/issues/4488/comments"},"review_comments":{"href":"https://api.github.com/repos/alphagov/whitehall/pulls/4488/comments"},"review_comment":{"href":"https://api.github.com/repos/alphagov/whitehall/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/alphagov/whitehall/pulls/4488/commits"},"statuses":{"href":"https://api.github.com/repos/alphagov/whitehall/statuses/1a98d049b2aa1f473af140b4171dad52150fb279"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"barrucadu"}}