Skip to content

fix(issue list): reject pull request-only search qualifiers#12623

Open
LouisLau-art wants to merge 1 commit intocli:trunkfrom
LouisLau-art:fix/issue-list-pr-search-qualifier
Open

fix(issue list): reject pull request-only search qualifiers#12623
LouisLau-art wants to merge 1 commit intocli:trunkfrom
LouisLau-art:fix/issue-list-pr-search-qualifier

Conversation

@LouisLau-art
Copy link

Fixes #8272.

Summary

  • Detect pull-request-only qualifiers in gh issue list --search (is:pr, type:pr, and pull-request variants).
  • Return a clear error message instead of issuing a GraphQL issue search that yields empty nodes.
  • Keep normal issue search behavior unchanged.

Why

gh issue list -S 'is:pr' currently produces blank rows because the search query mixes issue and PR semantics, and the response nodes don't match the expected issue shape.

This change fails fast with guidance to use gh pr list for PR searches.

Test

  • Added TestSearchIssues_rejectsPullRequestQualifiers in pkg/cmd/issue/list/http_test.go.
  • go test ./pkg/cmd/issue/list

@LouisLau-art LouisLau-art requested a review from a team as a code owner February 6, 2026 02:45
@LouisLau-art LouisLau-art requested a review from BagToad February 6, 2026 02:45
@cliAutomation cliAutomation added the external pull request originating outside of the CLI core team label Feb 6, 2026
@github-actions
Copy link

github-actions bot commented Feb 6, 2026

Thank you for your pull request! 🎉

This PR appears to fix the following issues that are not labeled with help wanted Contributions welcome :

As outlined in our Contributing Guidelines, we expect that PRs are only created for issues that have been labeled help wanted.

While we appreciate your initiative, please note that:

  • PRs for non-help wanted issues may not be reviewed immediately as they might not align with our current priorities
  • The issue might already be assigned to a team member or planned for a specific release
  • We may need to close this PR. For example, if it conflicts with ongoing work or architectural decisions

What happens next:

  • Our team will review this PR and the associated issues
  • We may add the help wanted label to the issues, if appropriate, and review this pull request
  • In some cases, we may need to close the PR. For example, if it doesn't fit our current roadmap

Thank you for your understanding and contribution to the project! 🙏

This comment was automatically generated by cliAutomation.

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

Labels

external pull request originating outside of the CLI core team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

gh issue list -S 'is:pr' returns blank issues

2 participants