You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a PR has bot-authored reviews spread across multiple API pages, claude-workflows/pr-review/scripts/pr-review.sh can fail to recognize that the latest bot verdict already matches the current verdict. The workflow then posts an unnecessary duplicate review instead of skipping.
This creates noisy duplicate reviews and extra workflow churn for users/repositories with long review histories.
Expected: The latest bot review state resolves to a single value (APPROVED), so equality check succeeds and the script skips posting a duplicate review when there are no new comments.
Actual: The jq pipeline emits one value per page (COMMENTED and APPROVED), producing a multiline LAST_OWN_STATE; string comparison fails and the script treats verdict as changed.
Multiline LAST_OWN_STATE is compared to single EXPECTED_STATE, causing false mismatch and duplicate review posting behavior.
Duplicate check performed: no open/merged issue/PR found for this exact pr-review.sh paginated state parsing bug using GitHub search queries ("pr-review.sh" "--paginate" "reviews", merged PR search with same terms).
Note
🔒 Integrity filter blocked 3 items
The following items were blocked because they don't meet the GitHub integrity level.
#399search_pull_requests: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
#705search_pull_requests: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
#600search_pull_requests: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
To allow these resources, lower min-integrity in your GitHub frontmatter:
Impact
When a PR has bot-authored reviews spread across multiple API pages,
claude-workflows/pr-review/scripts/pr-review.shcan fail to recognize that the latest bot verdict already matches the current verdict. The workflow then posts an unnecessary duplicate review instead of skipping.This creates noisy duplicate reviews and extra workflow churn for users/repositories with long review histories.
Reproduction Steps
Expected vs Actual
Expected: The latest bot review state resolves to a single value (
APPROVED), so equality check succeeds and the script skips posting a duplicate review when there are no new comments.Actual: The jq pipeline emits one value per page (
COMMENTEDandAPPROVED), producing a multilineLAST_OWN_STATE; string comparison fails and the script treats verdict as changed.Observed output:
Failing Test
Evidence
claude-workflows/pr-review/scripts/pr-review.sh:159-161gh api .../reviews --paginate | jq ... '[.[] | select(.user.login == $login)] | last | .state // empty'--paginate, each page is processed independently by jq, so this can emit multiple lines.claude-workflows/pr-review/scripts/pr-review.sh:163-165LAST_OWN_STATEis compared to singleEXPECTED_STATE, causing false mismatch and duplicate review posting behavior.pr-review.shpaginated state parsing bug using GitHub search queries ("pr-review.sh" "--paginate" "reviews", merged PR search with same terms).Note
🔒 Integrity filter blocked 3 items
The following items were blocked because they don't meet the GitHub integrity level.
search_pull_requests: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".search_pull_requests: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".search_pull_requests: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".To allow these resources, lower
min-integrityin your GitHub frontmatter:What is this? | From workflow: Trigger Bug Hunter
Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not.