feat(labels): 兼容文档里的 labels pending / labels search 写法
设计文档写的是 `labels pending` / `labels search --grep`,CLI 是扁平参数。 把 pending/search 作为无意义位置词过滤掉,使两种写法都可用(不动参数语义)。 实测:labels pending --count → 2;labels search --grep 联调 --count → 1。 全量 605 passed / 0 failed。
This commit is contained in:
1 parent
307c8efa81
commit
6ae0d39e5a
1 file changed
+9
@@ -628,6 +628,15 @@ fn try_main(cli: Cli) -> Result<i32> {
|
||||
}
|
||||
}
|
||||
|
||||
// Accept the documented shapes `labels pending` / `labels search`
|
||||
// as no-op words (the flags carry the real intent).
|
||||
let paths: Vec<&std::path::PathBuf> = paths
|
||||
.iter()
|
||||
.filter(|p| {
|
||||
let s = p.to_string_lossy();
|
||||
!(s == "pending" || s == "search")
|
||||
})
|
||||
.collect();
|
||||
let mut files: Vec<std::path::PathBuf> = Vec::new();
|
||||
for p in &paths {
|
||||
files.extend(collect_mq_files(p)?);
|
||||
|
||||
Reference in new issue
Block a user