Skip to content

fix(gh): print 'No Pull Requests' when pr list is empty#766

Closed
saschabuehrle wants to merge 1 commit intortk-ai:masterfrom
saschabuehrle:fix/issue-764-empty-pr-list
Closed

fix(gh): print 'No Pull Requests' when pr list is empty#766
saschabuehrle wants to merge 1 commit intortk-ai:masterfrom
saschabuehrle:fix/issue-764-empty-pr-list

Conversation

@saschabuehrle
Copy link

Bug

#764rtk gh pr list on a repo with zero PRs prints the "Pull Requests" header with no entries, giving no indication the list is actually empty.

Fix

Early-return with No Pull Requests (or No PRs in ultra-compact mode) when the parsed JSON array is empty.

Follows the same pattern as the existing output: the message is both printed to stdout and tracked in the filtered string for telemetry.

Testing

Tested against a repo with no open PRs:

# Before
$ rtk gh pr list --repo <no-prs-repo>
Pull Requests

# After
$ rtk gh pr list --repo <no-prs-repo>
No Pull Requests

Happy to address any feedback.

Greetings, saschabuehrle

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@pszymkowiak pszymkowiak added bug Something isn't working effort-small Quelques heures, 1 fichier good first issue Good for newcomers labels Mar 21, 2026
@pszymkowiak
Copy link
Collaborator

[w] wshm · Automated triage by AI

📊 Automated PR Analysis

🐛 Type bug-fix
🟢 Risk low

Summary

Fixes the empty PR list output for rtk gh pr list by adding an early return that prints 'No Pull Requests' (or 'No PRs' in ultra-compact mode) when the parsed JSON array is empty. Previously, only the header was printed with no indication that there were no PRs.

Review Checklist

  • Tests present
  • Breaking change
  • Docs updated

Linked issues: #764


Analyzed automatically by wshm · This is an automated analysis, not a human review.

@aeppling aeppling added the wrong-base PR targets master instead of develop label Mar 21, 2026
@aeppling
Copy link
Contributor

Hello ! Please target develop branch and read CONTRIBUTING.md so you can pass all check.

Thanks for the contribution, should be quickly merge then

@aeppling aeppling self-assigned this Mar 21, 2026
@aeppling aeppling added the filter-quality Filter produces incorrect/truncated signal label Mar 21, 2026
@saschabuehrle
Copy link
Author

Closing to retarget against develop — will reopen with the correct base branch.

Greetings, saschabuehrle

@saschabuehrle
Copy link
Author

Retargeted to develop as PR #779. Also signed the CLA.

Greetings, saschabuehrle

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

Labels

bug Something isn't working effort-small Quelques heures, 1 fichier filter-quality Filter produces incorrect/truncated signal good first issue Good for newcomers wrong-base PR targets master instead of develop

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants