gitlink-cli/skills/gitlink-issue/references/gitlink-issue-update.md

1.5 KiB
Raw Blame History

issue +update

前置条件: 先阅读 ../gitlink-shared/SKILL.md 了解认证、全局参数和安全规则。

Update an existing issue's title, description, or state.

命令

# Update issue title
gitlink-cli issue +update -i 42 -t "New title"

# Update issue description
gitlink-cli issue +update -i 42 -b "Updated description"

# Update both title and state
gitlink-cli issue +update -i 42 -t "Revised title" -s closed

参数

参数 必填 说明
--id, -i Issue ID
--title, -t 新标题(映射为 API 字段 subject
--body, -b 新描述(映射为 API 字段 description
--state, -s 新状态: openclosed(映射为 API 字段 status_id
--owner 仓库所有者(自动从 git remote 解析)
--repo 仓库名称(自动从 git remote 解析)
--format 输出格式: json/table/yaml
--debug 开启调试输出

API

PUT /{owner}/{repo}/issues/{id}
Body: { "subject": title, "description": body, "status_id": state }

Workflow

  1. Confirm the fields to update and their new values with the user.
  2. Execute gitlink-cli issue +update -i {id} -t "..." -b "...".
  3. Report the updated issue details to the user.

[!CAUTION] This is a Write Operation -- confirm user intent before executing.

References