From aecb00c874b514bbf3945912c49dcb9684256685 Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 9 Jun 2026 22:01:46 +0000 Subject: [PATCH] Raise gh pr list limit to 100 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit gh pr list returns at most 30 results by default, so a branch with more direct children than that would silently lose part of the fan-out, and has_sibling_conflicts could miss a labeled sibling and delete a branch it still needs. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01JHvKryT4QUpHYdNq9YEQxX --- update-pr-stack.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/update-pr-stack.sh b/update-pr-stack.sh index eb7487b..38ca10a 100755 --- a/update-pr-stack.sh +++ b/update-pr-stack.sh @@ -189,7 +189,7 @@ has_sibling_conflicts() { # Find all open PRs with the conflict label that are based on BASE_BRANCH local CONFLICTED_SIBLINGS - CONFLICTED_SIBLINGS=$(gh pr list --base "$BASE_BRANCH" --label "$CONFLICT_LABEL" --json headRefName --jq '.[].headRefName' 2>/dev/null || echo "") + CONFLICTED_SIBLINGS=$(gh pr list --limit 100 --base "$BASE_BRANCH" --label "$CONFLICT_LABEL" --json headRefName --jq '.[].headRefName' 2>/dev/null || echo "") for SIBLING in $CONFLICTED_SIBLINGS; do if [[ "$SIBLING" != "$EXCLUDE_BRANCH" ]]; then @@ -308,7 +308,7 @@ main() { [[ -n "$BRANCH" ]] || continue INITIAL_NUMBERS+=("$NUMBER") INITIAL_TARGETS+=("$BRANCH") - done < <(log_cmd gh pr list --base "$MERGED_BRANCH" --json number,headRefName --jq '.[] | "\(.number) \(.headRefName)"') + done < <(log_cmd gh pr list --limit 100 --base "$MERGED_BRANCH" --json number,headRefName --jq '.[] | "\(.number) \(.headRefName)"') # Track successfully updated vs conflicted branches separately UPDATED_TARGETS=()