Skip to content

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

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

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

Conversation

@saschabuehrle
Copy link
Copy Markdown

Bug

#764rtk gh pr list prints an empty header with no feedback when there are zero pull requests.

Fix

Added early return with a user-friendly message (No Pull Requests or No PRs in ultra-compact mode) when the parsed JSON array is empty, matching the existing pattern for rtk gh issue list.

Testing

Verified by running rtk gh pr list on a repo with no open PRs. Confirmed the message renders correctly in both normal and ultra-compact (-U) modes.

Happy to address any feedback.

Greetings, saschabuehrle

@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Mar 22, 2026

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 3 committers have signed the CLA.

✅ pszymkowiak
❌ saschabuehrle
❌ github-actions[bot]
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 22, 2026
@pszymkowiak
Copy link
Copy Markdown
Collaborator

[w] wshm · Automated triage by AI

📊 Automated PR Analysis

🐛 Type bug-fix
🟢 Risk low

Summary

This PR fixes issue #764 where rtk gh pr list printed an empty header with no feedback when there were zero pull requests. It adds an early return with a user-friendly message ('No Pull Requests' or 'No PRs' in ultra-compact mode) when the parsed JSON array is empty, matching the existing pattern used by rtk gh issue list. The diff also includes unrelated changes to documentation, copilot instructions, a hooks config, version bumps, and CHANGELOG updates.

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 self-assigned this Mar 22, 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 @saschabuehrle — the fix in gh_cmd.rs is exactly right, clean early return on empty PR list.

However, this PR includes 2500+ lines from develop that are already merged (copilot, cursor, windsurf, cline, openclaw, codex hooks, etc.). Only the 12 lines in gh_cmd.rs are new.

Could you rebase your branch on the latest develop so only your fix shows in the diff? That way we can review and merge cleanly.

git fetch upstream develop
git rebase upstream/develop
git push --force-with-lease

@aeppling
Copy link
Copy Markdown
Contributor

Hey

We are cleaning up the codebase and improving the project structure for better onboarding. As part of this effort, PR #826 reorganizes src/ from a flat layout into subfolders.

No logic changes — only file moves and import path updates.

What you need to do

Rebase your branch on develop when receiving this comment:

git fetch origin && git rebase origin/develop

Git detects renames automatically. If you get import conflicts, update the paths:

use crate::git;        // now: use crate::cmds::git::git;
use crate::tracking;   // now: use crate::core::tracking;
use crate::config;     // now: use crate::core::config;
use crate::init;       // now: use crate::hooks::init;
use crate::gain;       // now: use crate::analytics::gain;

Need help rebasing? Tag @aeppling

@saschabuehrle
Copy link
Copy Markdown
Author

Hi maintainers — I’m trying to complete the CLA for this PR, but the CLA assistant link/check is not loading on my side. Could you please re-trigger or refresh the CLA check for this PR? I’ll sign immediately once it’s accessible. Thanks!

@saschabuehrle saschabuehrle force-pushed the fix/issue-764-empty-pr-list branch from a4268ff to 6a51de3 Compare April 1, 2026 13:36
@saschabuehrle
Copy link
Copy Markdown
Author

Rebased this branch onto current develop and force-pushed. Diff is now only the empty PR list guard in gh_cmd.rs.\n\nGreetings, saschabuehrle

@saschabuehrle
Copy link
Copy Markdown
Author

Branch is rebased on develop and the diff is now just the empty-list guard in gh_cmd.rs. Please re-review when you have time.\n\nGreetings, saschabuehrle

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

Labels

awaiting-changes bug Something isn't working effort-small Quelques heures, 1 fichier good first issue Good for newcomers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants