)]}'
{
  "commit": "2e888e3e64c217ffff9f375c45ccd1f371fad7fe",
  "tree": "0208c5aab96f5278308a72635a8f043538d95564",
  "parents": [
    "3795d4b7f8301c9a170c291a0a8b97b548cfed40"
  ],
  "author": {
    "name": "Yun Peng",
    "email": "pcloudy@google.com",
    "time": "Thu Oct 01 11:16:53 2026 +0200"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Thu Oct 01 09:16:53 2026 +0000"
  },
  "message": "Don\u0027t let self-authored PRs break the BCR PR reviewer (#2904)\n\nFixes #2885\n\nGitHub doesn\u0027t let you review your own PR. So when a BCR PR was opened\nby @bazel-io (e.g. bazelbuild/bazel-central-registry#10700), the\n`APPROVE` `createReview` call in `reviewPR` threw. The error also\nescaped `runPrReviewer` and stopped the whole `review_prs` loop, which\nmeant no other open PRs got auto-reviewed either (e.g.\nbazelbuild/bazel-central-registry#10699).\n\n### Changes\n- `reviewPR`: when the PR author is the authenticated bot account, the\nreviewer doesn\u0027t call `createReview` (it skips both `APPROVE` and\n`REQUEST_CHANGES`). If every module has its maintainers\u0027 approval, it\nposts a comment (only once) and requests a review from `bcr-maintainers`\ninstead. It still tries to merge, so the PR gets merged on a later run\nonce a BCR maintainer approves.\n- `runPrReviewer`: errors are caught per PR, so a failure on one PR no\nlonger blocks the rest. If any PR failed, the run is marked failed at\nthe end (`setFailed`) so the errors still show up.\n- Export `reviewPR`/`runPrReviewer` and add unit tests for: the normal\napprove+merge path, a self-authored PR, and one PR failing while the\nloop keeps going.\n\n### Testing\n`cd actions/bcr-pr-reviewer \u0026\u0026 node --test`: all 12 tests pass.\n\nNote: BCR workflows pin this action by SHA, so a follow-up BCR PR that\nbumps the SHA is needed for this to take effect.",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "543a38f74f9d099f1bb670af2b7ef280b584833c",
      "old_mode": 33188,
      "old_path": "actions/bcr-pr-reviewer/index.js",
      "new_id": "b0a36757faa7e215dd231a630b1ee835be837766",
      "new_mode": 33188,
      "new_path": "actions/bcr-pr-reviewer/index.js"
    },
    {
      "type": "modify",
      "old_id": "61870e9e653629c0f38cae9aede4c8e6f8443627",
      "old_mode": 33188,
      "old_path": "actions/bcr-pr-reviewer/index.test.js",
      "new_id": "f449154b5597ab84064e14159db9ee3c4fce38d1",
      "new_mode": 33188,
      "new_path": "actions/bcr-pr-reviewer/index.test.js"
    }
  ]
}
