Can I search github labels with logical operator OR?

后端 未结 3 963
梦如初夏
梦如初夏 2020-12-04 15:25

I\'m trying to filter all my issues on github like this:

label:bug OR label:enhancement

But obviously that does not work. I found this page

3条回答
  •  隐瞒了意图╮
    2020-12-04 15:44

    Github does not support searching the labels that way. The searching for issues is considered to be an "AND" instead of an "OR" .

    Here's a repository used to try this out.

    Example demonstrating github supports "AND" in search

    My expectations

    All the issues that are enhancement, feature or both should appear..

    1. enhancement and feature

    2. enhancement

    3. feature

    Actual result

    Only the ones which were both were shown.

    1. enhancement and feature

    Hence it does not support OR operator.

    UPDATE

    Another tedious hack around this could be remove the unwanted labels using a -(minus) symbol before the label. Look at the following example

    label:enhancement -label:bug -label:foo -label:bar
    

    This will list all the items not having foo, bar and bug as a label on them. This will work but can become tedious if labels are too many.

    Filtering issues containing only the enhancements

提交回复
热议问题