# 编辑问题

了解如何对现有问题进行更改。

## 编辑议题标题

可以编辑问题的标题。 标题的更改将添加到问题的时间表中。

1. 导航到要编辑的问题。

2. 在问题标题右侧，单击“**编辑**”。

   ![问题标题的屏幕截图，其中突出显示了橙色轮廓的“编辑”按钮。](/assets/images/help/issues/issue-edit-title.png)

3. 键入新标题。

4. 单击“ **保存**”。

## 编辑问题说明

还可以对问题说明进行更改。 除非作者或具有写入访问权限的人员将编辑历史记录删除，否则该记录可用。 请参阅“[跟踪评论中的更改](/zh/enterprise-server@3.22/communities/moderating-comments-and-conversations/tracking-changes-in-a-comment)”。

1. 导航到要编辑的问题。

2. 在问题说明的右上角，单击 <svg version="1.1" width="16" height="16" viewBox="0 0 16 16" class="octicon octicon-kebab-horizontal" aria-label="Issue body actions" role="img"><path d="M8 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3ZM1.5 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Zm13 0a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"></path></svg>。

   ![问题描述的屏幕截图。 “问题正文操作”按钮以橙色边框突出显示。](/assets/images/help/issues/issue-edit-description.png)

3. 在菜单中，单击“ **<svg version="1.1" width="16" height="16" viewBox="0 0 16 16" class="octicon octicon-pencil" aria-label="pencil" role="img"><path d="M11.013 1.427a1.75 1.75 0 0 1 2.474 0l1.086 1.086a1.75 1.75 0 0 1 0 2.474l-8.61 8.61c-.21.21-.47.364-.756.445l-3.251.93a.75.75 0 0 1-.927-.928l.929-3.25c.081-.286.235-.547.445-.758l8.61-8.61Zm.176 4.823L9.75 4.81l-6.286 6.287a.253.253 0 0 0-.064.108l-.558 1.953 1.953-.558a.253.253 0 0 0 .108-.064Zm1.238-3.763a.25.25 0 0 0-.354 0L10.811 3.75l1.439 1.44 1.263-1.263a.25.25 0 0 0 0-.354Z"></path></svg> 编辑**”。

4. 键入对问题说明的更改。

5. 单击“ **保存**”。

## 添加或更改问题类型

可以添加问题类型或对现有问题类型进行更改。

1. 导航到要编辑的问题。

2. 在问题右侧边栏中，单击“**类型**”。

   ![问题边栏的屏幕截图。 “添加问题类型”按钮以橙色边框突出显示。](/assets/images/help/issues/issue-add-type.png)

3. 在列表中，选择新的问题类型。

4. 单击“ **保存**”。

## 使用 GitHub CLI 编辑问题

GitHub CLI 是用于从计算机的命令行使用 GitHub 的开源工具。 从命令行操作时，您可以使用 GitHub CLI 来节省时间并避免切换上下文。 若要了解详细信息 GitHub CLI，请参阅 [关于 GitHub CLI](/zh/enterprise-server@3.22/github-cli/github-cli/about-github-cli)。

### 编辑单个问题

若要编辑问题，请将 `gh issue edit` 子命令与问题编号或 URL 一起使用。

```shell
gh issue edit ISSUE-NUMBER --title "TITLE" --body "ISSUE-DESCRIPTION"
```

### 编辑多个问题

可以传递多个问题编号，以同时对多个问题应用相同的更改。

```shell
gh issue edit ISSUE-NUMBER-1 ISSUE-NUMBER-2 --add-label "LABEL"
```

### 编辑问题类型

若要设置或删除问题类型，请使用 `--type` 或 `--remove-type` 标记。

```shell
gh issue edit ISSUE-NUMBER --type "ISSUE-TYPE"
gh issue edit ISSUE-NUMBER --remove-type
```

### 编辑父问题

若要设置或删除父问题，请使用 `--parent` 或 `--remove-parent` 标记。 父项可以通过问题编号或 URL 指定。

```shell
gh issue edit ISSUE-NUMBER --parent PARENT-ISSUE-NUMBER
gh issue edit ISSUE-NUMBER --remove-parent
```

### 编辑子问题

若要添加或删除子问题，请使用 `--add-sub-issue` 或 `--remove-sub-issue` 标志，并附上以逗号分隔的问题编号或 URL 列表。

```shell
gh issue edit PARENT-ISSUE-NUMBER --add-sub-issue SUB-ISSUE-NUMBER
gh issue edit PARENT-ISSUE-NUMBER --remove-sub-issue SUB-ISSUE-NUMBER
```

## 延伸阅读

* [关闭问题](/zh/enterprise-server@3.22/issues/tracking-your-work-with-issues/administering-issues/closing-an-issue)
* [删除议题](/zh/enterprise-server@3.22/issues/tracking-your-work-with-issues/administering-issues/deleting-an-issue)