Skip to content

docs: 坑速查新增#11——新版 gh item-edit 按名编辑须 --url 寻址(--id 禁配 --field) - #25

Merged
guanlili merged 3 commits into
mainfrom
docs/pitfall-11-item-edit-url
Nov 12, 2026
Merged

guanlili merged 3 commits into
mainfrom
docs/pitfall-11-item-edit-url

Conversation

@guanlili

Copy link
Copy Markdown
Owner

来源

内部(2026-11-12 jilin-flex-platform 飞书台账回填实战)。

坑的现场

gh 2.103.3 下,按老命令设字段:

gh project item-edit --id <item-id> --field 类型 --value 需求

报错:\--field` cannot be used with `--id`;use --url to address the item when editing by name`。

新版 gh 的两条寻址模式互斥:

模式 用法
按名(人读) gh project item-edit <编号> --owner @me --url <issue链接> --field 名 --value 值
按 ID(机器) --id <item> --project-id <pj> --field-id <field> --single-select-option-id <opt>

坑 2 的「--value 通吃所有字段类型」结论在 --url 模式下继续成立(本次 8 条 × 7 字段实测,含 TEXT/NUMBER/DATE/SINGLE_SELECT)。

改动

验证

  • 回填 8 条 issue 全部字段经 GraphQL 读回对账 8/8 干净(其中 --url 模式补写 55 个字段值无一失败)
  • 本 PR 仅文档改动

实测背景:2026-11-12 jilin-flex-platform 飞书台账回填(8 条 issue 入板补字段),
gh 2.103.3 下 `gh project item-edit --id <item> --field 名 --value 值` 报
`--field cannot be used with --id`。按名编辑须改用
`item-edit <编号> --owner @me --url <issue链接> --field 名 --value 值`;
`--id` 只配 `--field-id`+`--project-id`(机器模式)。坑2 的 --value 通吃结论不变。

同步:坑2 加交叉引用;README/README.zh-CN 坑数 10→11;AGENTS.md 红线5
计数 9→11(坑#10 加入时漏更)。
@guanlili
guanlili merged commit ca5414b into main Nov 12, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant