Skip to content

--label based OR returns AND-based results #5920

Description

@petemounce

Describe the bug

If I search with --label="label1,label2" I get back label1 & 2 results AND'd together instead of OR'd together.

λ  gh --version
gh version 2.13.0 (2022-06-22)
https://github.com/cli/cli/releases/tag/v2.13.0

Steps to reproduce the behavior

(Inside a repo that has 4 issues labelled question, 40 issues labelled documentation)

λ  gh issue list --label "question,documentation" --state all

Showing 2 of 2 issues in ******* that match your search

#8921  ****************  bug, documentation, question  about 27 minutes ago
#8850  ****************  documentation, question       about 1 hour ago

Expected vs actual behavior

I expected the command to give me back the union, not the intersection.

Logs

As above.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingneeds-triageneeds to be reviewed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions