)]}'
{
  "commit": "b1244a4ac5be5bf7c332745932d59ef1bdb19b40",
  "tree": "ac446260ae3d6af8a36c61e25d8d8620709f5c27",
  "parents": [
    "62c4303705803106bcfceb24575cc759ac1bdcf9"
  ],
  "author": {
    "name": "Edwin Kempin",
    "email": "ekempin@google.com",
    "time": "Thu Dec 04 12:12:27 2025 +0000"
  },
  "committer": {
    "name": "Edwin Kempin",
    "email": "ekempin@google.com",
    "time": "Thu Dec 04 14:11:55 2025 +0000"
  },
  "message": "Disable rename detection for the code owners submit rule\n\nThe code owners submit rule only checks if all paths (new and old) have\nbeen code owner approved (see CodeOwnerApprovalCheck#isSubmittable). For\nthis it\u0027s OK if for renamed files 2 FileCodeOwnerStatus\u0027es are returned\n(one for the new path and one for the old path), hence rename detection\ncan be disabled here.\n\nWhen code owner statuses are returned from the GetCodeOwnerStatus REST\nendpoint however we must detect renames (see\nCodeOwnerApprovalCheck#getFileStatusesAsSet) because our API\ndocumentation for this REST endpoint says that we return a single code\nowner status for renamed files. This is important for callers that do\npagination, e.g. if the change screen shows the first 200 files (which\nmay include renames) than getting the first 200 code owner statuses\nshould match these files (their new and old paths).\n\nChanging CodeOwnerApprovalCheck#getAllPathsAsApproved to always disable\nthe rename detection didn\u0027t make any tests fail although it affects the\nGetCodeOwnerStatus REST endpoint. This was because getAllPathsAsApproved\nis only called from the GetCodeOwnerStatus REST endpoint if a change\ncontains a renamed file and all files of the change are exempted from\nrequiring code owner approvals because a) the uploader is exempted from\nrequiring code owner approvals or b) the change is a pure revert and\npure reverts are configured to not require code owner approvals. The new\ntests in GetCodeOwnerStatusIT cover this now.\n\nCodeOwnerApprovalCheck has one more caller of ChangedFiles for which we\nhaven\u0027t checked yet whether rename detection can be disabled. At this\nplace we add a TODO so that we remember to check this later.\n\nBug: Google b/461456634\nChange-Id: I9fc7ca3a808a176324fc9eb2f1d49b4bb4b55cae\nSigned-off-by: Edwin Kempin \u003cekempin@google.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "31491fb17d2bce6bcc1129cdbef0fababec28464",
      "old_mode": 33188,
      "old_path": "java/com/google/gerrit/plugins/codeowners/backend/ChangedFiles.java",
      "new_id": "30d51aa70e53653dd72bd25100d30f653ef23a83",
      "new_mode": 33188,
      "new_path": "java/com/google/gerrit/plugins/codeowners/backend/ChangedFiles.java"
    },
    {
      "type": "modify",
      "old_id": "4e30b1a89cfe2f10dfbdf0227dc4d61a2c6f74c0",
      "old_mode": 33188,
      "old_path": "java/com/google/gerrit/plugins/codeowners/backend/CodeOwnerApprovalCheck.java",
      "new_id": "deb050731f2ea3ef1eafa470d5165176c146fc6b",
      "new_mode": 33188,
      "new_path": "java/com/google/gerrit/plugins/codeowners/backend/CodeOwnerApprovalCheck.java"
    },
    {
      "type": "modify",
      "old_id": "059ab957a28603b1497dedc097356cd3597edb50",
      "old_mode": 33188,
      "old_path": "javatests/com/google/gerrit/plugins/codeowners/acceptance/api/GetCodeOwnerStatusIT.java",
      "new_id": "c8aef140756dc58c4cd75b2adef420e8c820bbba",
      "new_mode": 33188,
      "new_path": "javatests/com/google/gerrit/plugins/codeowners/acceptance/api/GetCodeOwnerStatusIT.java"
    },
    {
      "type": "modify",
      "old_id": "5df0afbf1d8b6af4accd9a23f9764826e18dda88",
      "old_mode": 33188,
      "old_path": "javatests/com/google/gerrit/plugins/codeowners/backend/ChangedFilesTest.java",
      "new_id": "02016d8fb3cdfa656e595b380362539f4fa630fb",
      "new_mode": 33188,
      "new_path": "javatests/com/google/gerrit/plugins/codeowners/backend/ChangedFilesTest.java"
    }
  ]
}
