Skip to content

fix(gh): show "No Pull Requests" / "No Issues" for empty lists#935

Merged
FlorianBruniaux merged 1 commit intortk-ai:developfrom
Bortlesboat:fix/empty-pr-issue-list-output
Apr 13, 2026
Merged

fix(gh): show "No Pull Requests" / "No Issues" for empty lists#935
FlorianBruniaux merged 1 commit intortk-ai:developfrom
Bortlesboat:fix/empty-pr-issue-list-output

Conversation

@Bortlesboat
Copy link
Copy Markdown
Contributor

When rtk gh pr list or rtk gh issue list returns an empty JSON array, the header is printed with nothing below it. This displays "No Pull Requests" (or "No PRs" in ultra-compact mode) and "No Issues" instead.

Fixes #764

Changes:

  • list_prs: check prs.is_empty() before printing header
  • list_issues: same pattern

All 52 existing gh_cmd tests pass. cargo clippy clean.

@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Mar 30, 2026

CLA assistant check
All committers have signed the CLA.

@Bortlesboat Bortlesboat changed the base branch from master to develop March 30, 2026 18:16
When `rtk gh pr list` or `rtk gh issue list` returns an empty array,
the header ("Pull Requests" / "Issues") is printed with nothing below
it. Display "No Pull Requests" / "No Issues" instead.

Closes rtk-ai#764
@Bortlesboat Bortlesboat force-pushed the fix/empty-pr-issue-list-output branch from 4e7abe2 to ec4d243 Compare April 2, 2026 01:42
@aeppling aeppling self-assigned this Apr 2, 2026
Copy link
Copy Markdown
Collaborator

@pszymkowiak pszymkowiak left a comment

Choose a reason for hiding this comment

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

Thanks @Bortlesboat — clean fix, handles both PR and issue empty lists correctly. The ultra_compact variant for PRs is a nice touch.

LGTM.

@FlorianBruniaux FlorianBruniaux merged commit aa54613 into rtk-ai:develop Apr 13, 2026
10 checks passed
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.

rtk gh pr list with no PRs prints "Pull Requests"

5 participants