{"push_id":2536641050,"size":1,"distinct_size":1,"ref":"refs/heads/shw-dates-from-api","head":"5acec250d3e5b4e3298a1069b9526057619acc3d","before":"7b9119eadd2612141faa647ec0f47c0aaf503b79","commits":[{"sha":"5acec250d3e5b4e3298a1069b9526057619acc3d","author":{"name":"Samuel Williams","email":"137dee56db168f32f5b40c18f532dc6c87fffd61@digital.cabinet-office.gov.uk"},"message":"Use framework dates from API\n\n ## Summary\nWe currently store dates for important framework lifecycle events as\ndate strings in a `dates.yml` file stored in\ndigitalmarketplace-frameworks for each framework. Given it's a string,\nit's not ideal for machine processing and makes it hard to format in\ndifferent ways. We also have some denormalisation as we store one of the\ndatetimes in two places: the API and the dates file.\n\nWe are now migrating all dates onto the `framework` record on the API\nand storing them as real datetimes (returned as ISO8601 datetimestamps\nfrom the API). With this standardised format and centralised source of\ntruth, we are less likely to have these gets get out of sync and it's\neasier to use our existing datetime formatters to present it\nappropriately depending on the context.\n\nWe normally present each date in a single way across the Digital\nMarketplace, so a utility function in dm-utils injects these standard\nformats for each date into the `framework` dictionary. These values are\nthen used during templating rather than the raw UTC values.\n\nThis PR also contains a fair bit of work to utilise API stub responses\nthat are now available in dm-utils to reduce boilerplate and give more\nvalid test data rather than the smallest subset of keys required for\ntests to pass. This should make it easier to write tests in the future\nand provide more certainty that the code is functioning correctly.","distinct":true,"url":"https://api.github.com/repos/alphagov/digitalmarketplace-supplier-frontend/commits/5acec250d3e5b4e3298a1069b9526057619acc3d"}]}
{"actor":{"display_login":"samuelhwilliams"}}