Fix silent truncation at gh's default --limit of 30 - #17
Merged
Conversation
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).
Contributor
There was a problem hiding this comment.
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 500to the open PR count query (gh pr list ... -q 'length'). - Add
--limit 500to 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 50to--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) | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds an explicit
--limit 500to the threegh pr list/gh issue listcalls in the daily report that didn't have one, so they stop silently
capping at gh's default of 30.
Why
Confirmed live:
kuberneteshas 38 open issues (37 excluding DependencyDashboard). The unpatched
gh issue listcall reported 29 - silentlydropping the 9 oldest. Same underlying issue as the
rundeck-ec2-nodes-plugin#27miss during today's manual issue cleanup (a
gh issue listrun there withno
--limitdropped the single oldest open issue off the end).Where
gh pr list ... --json number)gh issue list ... --json title)gh pr list ... --limit 50->500, already had an explicit limit but still low enough to eventually truncate)