我可以使用逻辑运算符OR搜索github标签吗? [英] Can I search github labels with logical operator OR?

查看:246
本文介绍了我可以使用逻辑运算符OR搜索github标签吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

 标签:bug OR标签:增强$ b我试图在github上过滤所有的问题$ b  

但显然这是行不通的。我发现这个页面
https://help.github.com/articles/searching-issues/
,我认为它必须写在那里,但我不知道如何去做。



难道真的是不能过滤两个标签的问题吗?我的意思是,这将是一个基本的任务,不是吗?

如果有人可以给我一个提示,我很乐意听到这个消息。

解决方案

Github不支持以这种方式搜索标签。搜索问题被认为是一个AND而不是一个OR。

这是一个存储库,用于试用这个。



示例演示github支持搜索中的AND


我的期望


所有问题都是增强,功能或两者应该出现..


  1. 增强和功能

  2. 增强


  3. 功能


  4. b

    lockquote
    实际结果

    只有那两个都显示出来。


    1. 增强和功能

    因此它不支持OR运算符。
    $ b $ p UPDATE


    另外一个繁琐的黑客攻击可能会被删除使用标签前面的 - (减号)符号标记不需要的标签。看看下面的例子:

    $ p $ label:enhancement -label:bug -label:foo -label:bar
    code>

    这会列出所有没有foo,bar和bug的项目作为标签。这将工作,但可以成为繁琐,如果标签太多。



    仅包含增强功能的过滤问题


    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 https://help.github.com/articles/searching-issues/ and i thought it must be written there, but I cannot figure out how to do it.

    Could it really be that one cannot filter issues of two labels? I mean that would be such a basic task, wouldn't it?

    Well if anyone could give me a hint upon that matter I'd be glad to hear it.

    解决方案

    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

    这篇关于我可以使用逻辑运算符OR搜索github标签吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆