根据文档,我可以使用-从搜索API中排除某些东西.例如,我对它进行了测试,这在语言领域是有效的,但在主题上不起作用。
注意,猫stars:>10 -language:javascript将存储库与“猫”一词相匹配,“猫”有10多颗星星,但不是用JavaScript编写的。
但是,如果我想搜索cats stars:>10 -topic:javascript,它就不再工作了,尽管我对它进行了测试,并且确实有9个以javascript为主题的存储库。
所以
cats stars:>10返回714个结果
cats stars:>10 -topic:javascript返回714个结果(-不工作)
cats stars:>10 +topic:javascript返回9个结果
cats stars:>10 -language:javascript返回602个结果(-按预期工作)
cats stars:>10 +language:javascript返回112个结果
发布于 2022-09-27 09:15:10
GitHub CLI有一个解决办法:
将:ORG替换为组织名称。
Unix:
gh repo list ORG --json name,repositoryTopics --limit 200 --jq '.[] | select(.repositoryTopics//[] | all(.name != "unwanted-label-name"))' | sortWindows:
gh repo list ORG --json name,repositoryTopics --limit 200 --jq ".[] | select(.repositoryTopics//[] | all(.name != """unwanted-label-name"""))" | sort对于GitHub企业,在运行命令之前设置环境变量:
GH_HOST=your.github.enterprise.company.hosthttps://stackoverflow.com/questions/65554246
复制相似问题