Skip to content

Fix silent truncation at gh's default --limit of 30 - #17

Merged
fdevans merged 1 commit into
mainfrom
fix-gh-list-default-limit
Aug 19, 2026
Merged

Fix silent truncation at gh's default --limit of 30#17
fdevans merged 1 commit into
mainfrom
fix-gh-list-default-limit

Conversation

@fdevans

@fdevans fdevans commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

What

Adds an explicit --limit 500 to the three gh pr list/gh issue list
calls in the daily report that didn't have one, so they stop silently
capping at gh's default of 30.

Why

Confirmed live: kubernetes has 38 open issues (37 excluding Dependency
Dashboard). The unpatched gh issue list call reported 29 - silently
dropping the 9 oldest. Same underlying issue as the rundeck-ec2-nodes-plugin#27
miss during today's manual issue cleanup (a gh issue list run there with
no --limit dropped the single oldest open issue off the end).

Where

  • PR count (gh pr list ... --json number)
  • Issue count (gh issue list ... --json title)
  • Per-PR attention analysis (gh pr list ... --limit 50 -> 500, already had an explicit limit but still low enough to eventually truncate)

The PR count, issue count, and per-PR attention-analysis gh calls in the
daily report had no explicit --limit, so gh silently capped each at its
default of 30. Confirmed for real: kubernetes has 38 open issues (37
excluding Dependency Dashboard); the unpatched call reported 29. This is
the same class of bug that let rundeck-ec2-nodes-plugin's oldest open
issue (#27) slip past an earlier manual gh issue list run.

Set --limit 500 on all three calls (PR count, issue count, and the
per-PR attention loop, which was already explicitly capped at 50).
@fdevans
fdevans requested review from a team and a lite review from Copilot August 19, 2026 17:44
@fdevans
fdevans merged commit 231bdd6 into main Aug 19, 2026
1 check passed

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the org-wide daily PR/issue tracking workflow to avoid GitHub CLI’s default --limit 30 silently truncating results, improving the accuracy of backlog and “needs attention” reporting across repos.

Changes:

  • Add --limit 500 to the open PR count query (gh pr list ... -q 'length').
  • Add --limit 500 to the open issue count query (gh issue list ... | length, excluding “Dependency Dashboard”).
  • Increase the per-repo PR details fetch used for attention analysis from --limit 50 to --limit 500.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +67 to +70
# --limit explicitly set well above gh's default of 30 - that
# default silently truncated results (a real miss: it dropped
# rundeck-ec2-nodes-plugin's oldest open issue, #27, from a
# manual count run off this same pattern before this fix).
Comment on lines 85 to 87
if [ "$count" -gt 0 ]; then
prs=$(gh pr list --repo rundeck-plugins/$repo --state open --json number,title,updatedAt,author --limit 50)
prs=$(gh pr list --repo rundeck-plugins/$repo --state open --json number,title,updatedAt,author --limit 500)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants