)]}'
{
  "commit": "d97111e4712b104c726fb66f7963434cb0457fcc",
  "tree": "501bda1fafe0e2c0b36339bcdabc6edab185a152",
  "parents": [
    "bf49a0edc2c5aa879511846ef5285f709cd27e76"
  ],
  "author": {
    "name": "zozo123",
    "email": "yossi.eliaz@incredibuild.com",
    "time": "Sun Aug 30 23:22:39 2026 -0700"
  },
  "committer": {
    "name": "Copybara-Service",
    "email": "copybara-worker@google.com",
    "time": "Sun Aug 30 23:24:02 2026 -0700"
  },
  "message": "Paginate PR reviews fetch in Community Review Labeler (https://github.com/bazelbuild/bazel/pull/30359)\n\n## Problem\n\nThe hourly Community Review Labeler queried each PR\u0027s reviews without pagination, so it only received the first page (30 reviews). Because the endpoint lists reviews oldest-first and the script selects the latest trusted review, PRs with more than 30 reviews could be labeled from stale data.\n\nA simple `--paginate` addition has a second edge case: if a later page fails, `gh api` may already have emitted earlier pages. Treating that partial output as complete could still produce an incorrect label decision.\n\n## Fix\n\n- Fetch every review page with `gh api --paginate`.\n- Fail closed when any page fails: log the PR number and skip its label update.\n- Preserve the existing newline-delimited output consumed by the downstream `jq -s` selection.\n\n## Verification\n\n- `bash -n .github/scripts/community_review_labeler.sh`\n- `shellcheck .github/scripts/community_review_labeler.sh`\n- Behavioral harness covering:\n  - successful multi-page output selects the newest trusted review;\n  - empty review history causes no update;\n  - a later-page failure after partial output causes no label mutation.\n- Verified pagination against a real PR with `per_page\u003d1`: without `--paginate` only the first review is returned; with it, all reviews are streamed and the newest review is selected.\n\n## Tracking issue\n\nFixes #30362\n\nCloses #30359.\n\nPiperOrigin-RevId: 973684343\nChange-Id: I3294f7faa717483a205663c546711685463116f5\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "d51754c9b8a83e895c5054801b00eea374c6abb6",
      "old_mode": 33261,
      "old_path": ".github/scripts/community_review_labeler.sh",
      "new_id": "2e2b346228f18109821582f89d56a769654239c7",
      "new_mode": 33261,
      "new_path": ".github/scripts/community_review_labeler.sh"
    }
  ]
}
