)]}'
{
  "commit": "2e47ef73fa0ee38c2a97a3f95e121bf430d1dfdf",
  "tree": "2f41bcee71e93b51d18ac73099710caed35f0387",
  "parents": [
    "0674a95d59c0390b516efa0bbdd27de8cdc8b4df"
  ],
  "author": {
    "name": "Ben Rohlfs",
    "email": "brohlfs@google.com",
    "time": "Mon Jan 23 17:11:38 2023 +0100"
  },
  "committer": {
    "name": "Ben Rohlfs",
    "email": "brohlfs@google.com",
    "time": "Tue Jan 24 17:54:18 2023 +0100"
  },
  "message": "Extract route handling into view model\n\nThis is a refactoring for just 1 of ~50 routes. Once this is reviewed\nand submitted we will follow up with the 49 routes.\n\nThe core of all route handlers is to convert a URL into a view model\nstate. We think that it is vital to have the code for converting state\ninto URL and back in the same file. We already have the create...Url()\nfunctions in view model classes. We would also like to have urlToState()\nfunctions in the same file.\n\nIt is also beneficial to have the patterns for matching a URL and the\nfunction for converting the URL into a state object very close to each\nother. Let\u0027s create the notion of a `Route` for that. This is just\n`pattern` and `createState()` in one object.\n\nMost of the current handlers just use the `params` and the `querystring`\nfor creating a view state, and then they call `this.setState()` and\n`viewModel.setState()`. Let\u0027s create a new method `mapRouteState()`\nthat is similar to what `mapRoute()` does, but caters for the newly\nintroduced concepts above.\n\nThere are tons of things that could be further refactored in the router,\nbut we are trying to be focused with this change, and only do one thing.\nWe are happy to add further TODOs and comments though, if reviewers have\nideas or questions.\n\nOne of the goals of this change is also to address the fragile handling\nof repo routes. It will be very beneficial for that effort to have all\nthe handlers and tests in one place.\n\nRelease-Notes: skip\nChange-Id: I537733c099660470019840ab4614a751dd5ec1d9\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "bcf693701073eeb04a858ba570fd01cd92a8ac35",
      "old_mode": 33188,
      "old_path": "polygerrit-ui/app/elements/core/gr-router/gr-router.ts",
      "new_id": "fac7a83dcbd5b754afcfb634f8c67602727b901e",
      "new_mode": 33188,
      "new_path": "polygerrit-ui/app/elements/core/gr-router/gr-router.ts"
    },
    {
      "type": "modify",
      "old_id": "d8761bfc0f96e9e811272c380c9f3f9429283231",
      "old_mode": 33188,
      "old_path": "polygerrit-ui/app/elements/core/gr-router/gr-router_test.ts",
      "new_id": "112c776a4523dbba5f06fd6fc244afe47f190d92",
      "new_mode": 33188,
      "new_path": "polygerrit-ui/app/elements/core/gr-router/gr-router_test.ts"
    },
    {
      "type": "modify",
      "old_id": "0261992b89fb9ecc1deba7e5560ae7c48e907d4b",
      "old_mode": 33188,
      "old_path": "polygerrit-ui/app/elements/gr-app-types.ts",
      "new_id": "68e73098d53e02f1e459413dad80a9dbbf50d94b",
      "new_mode": 33188,
      "new_path": "polygerrit-ui/app/elements/gr-app-types.ts"
    },
    {
      "type": "modify",
      "old_id": "3380637e72d0b06d1f3c3a09f2a35595ce25302d",
      "old_mode": 33188,
      "old_path": "polygerrit-ui/app/models/views/admin.ts",
      "new_id": "de9ec5dd1ef062e0d1969653999b307192c7bff0",
      "new_mode": 33188,
      "new_path": "polygerrit-ui/app/models/views/admin.ts"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "c9b7801af2f4f269d1e20a324ef719a012b46a94",
      "new_mode": 33188,
      "new_path": "polygerrit-ui/app/models/views/admin_test.ts"
    },
    {
      "type": "modify",
      "old_id": "065495d9683db3549b992de2d6329927dfd5a9f2",
      "old_mode": 33188,
      "old_path": "polygerrit-ui/app/models/views/base.ts",
      "new_id": "72bec33ee6427fa73ed2c3acf6f137f05da8475a",
      "new_mode": 33188,
      "new_path": "polygerrit-ui/app/models/views/base.ts"
    },
    {
      "type": "modify",
      "old_id": "c3c1cb6dc9785ee511f59b955b00ca04804ce100",
      "old_mode": 33188,
      "old_path": "polygerrit-ui/app/services/router/router-model.ts",
      "new_id": "5e2cc10b4139568f23671723a61aa2ec307bad3c",
      "new_mode": 33188,
      "new_path": "polygerrit-ui/app/services/router/router-model.ts"
    }
  ]
}
