用自然语言提示让 Copilot 生成与更新 GitHub Issue
介绍 GitHub Copilot 在公开预览阶段根据自然语言提示或截图创建、更新 Issue 的用法,涵盖批量起草、拆分子议题、关联已有议题以及指派 Copilot 等操作方式。
说明 此功能在公开预览中进行,并可更改. 副驾驶可以从自然语言的提示或截图中创建或更新问题。它会填充标题、正文、标签、受让人,并在可用时更多地使用您的寄存器问题表或模板。在提交草稿之前,审查并完善每一份草稿。 ## [创建问题](<https://docs.github.com/en/copilot/how-tos/copilot-on-github/copilot-for-github-tasks/use-copilot-to-create-or-update-issues#create-an-issue>) 1. 导航到 [https://github.com/copilot](<https://github.com/copilot?ref_product=copilot&ref_type=engagement&ref_style=text>). 2. 在提示框中,请描述您要创建的问题。使用 `repo-owner/repo-name` 以特定存储器为目标。 例如: - `In OWNER/REPOSITORY, create a feature request to add fuzzy matching to search.` - `Log a bug for a 500 error. This happens consistently when I try to log into the site.` - `Create a task to change the application logo background to red and add the label "needs design review".` 说明 您只能在拥有权限的仓库中创建问题 。 3. 可选地将图像粘贴、拖动或附加到您的提示上。 添加文字来描述这个问题, 例如 : `Create an issue because this error appears when trying to reset a password.` 4. 副驾驶用建议的标题、正文和元数据( 标签、 受让人、 问题类型) 起草一个问题。 如果您的寄存器有问题表或模板, 则副驾驶将您的提示映射到相关字段 。 5. 审查草稿。 编辑任意字段, 选择不同的模板, 或请 Copilot 在后续提示下进行修改 。 6. 单击 **创建**. ## [创建多个问题](<https://docs.github.com/en/copilot/how-tos/copilot-on-github/copilot-for-github-tasks/use-copilot-to-create-or-update-issues#create-multiple-issues>) 如果您的提示包含多个任务或错误, 副驾驶将分别起草 。 例如: `In OWNER/REPOSITORY, create 3 issues: 1) DETAILS OF ONE TASK, 2) DETAILS OF ANOTHER TASK, 3) DETAILS OF A THIRD TASK` 逐一审查和编辑每个草稿,然后单击 **创建** 将出版。 ## [创建子问题](<https://docs.github.com/en/copilot/how-tos/copilot-on-github/copilot-for-github-tasks/use-copilot-to-create-or-update-issues#create-sub-issues>) 副驾驶可以将任务分解为带有子问题的母问题. 例如: `In octo-org/octo-repo, plan a new user dashboard. Break it down into an epic, and create sub-issues for each main feature and task.` copilot 生成带有父问题和子问题的草稿树。 扩展或崩溃子问题, 编辑细节, 并使用后续提示来添加或删除子问题 。 等你准备好了,点击 **审查和创建**,然后单击 **创建问题**. ## [更新现有问题](<https://docs.github.com/en/copilot/how-tos/copilot-on-github/copilot-for-github-tasks/use-copilot-to-create-or-update-issues#update-an-existing-issue>) 提示 copilot 修改一个已经存在的问题。 例如 : `In octo-org/octo-repo, update issue #123 to add more details about the bug and steps to reproduce it. Also, change the label to "bug" and assign it to @username.` 在工作台中审查草稿,然后点击 **更新**. ## [链接到现有的父问题或子问题](<https://docs.github.com/en/copilot/how-tos/copilot-on-github/copilot-for-github-tasks/use-copilot-to-create-or-update-issues#link-to-existing-parent-or-sub-issues>) 副驾驶可以将新问题与已经存在的问题联系起来。 例如: - `Create a sub-issue for octo-org/octo-repo issue #456.` - `Create a parent issue for octo-org/octo-repo issue #456.` - `Create a parent issue for octo-org/octo-repo issues #456, #457, and #458.` 在工作台中审查草稿,然后点击 **审查和创建** > **创建问题**. ## [向副驾驶分配一个问题](<https://docs.github.com/en/copilot/how-tos/copilot-on-github/copilot-for-github-tasks/use-copilot-to-create-or-update-issues#assign-an-issue-to-copilot>) 在启用了副驾驶云代理后, 您可以在创建过程中为副驾驶分配一个问题 。 [在云中为您的企业或组织管理 GitHub 副驾驶](<https://docs.github.com/en/copilot/concepts/enterprise/cloud-agent-access>). - **自然语言 :** 包含 `Assign this issue to Copilot.` 在你的即时。 - **手动:** 从受让人列表中选择“驾驶员”。 副驾驶在创作后自动开始研究这个问题. ## [进一步阅读](<https://docs.github.com/en/copilot/how-tos/copilot-on-github/copilot-for-github-tasks/use-copilot-to-create-or-update-issues#further-reading>) - [为您的寄存器配置问题模板](<https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/configuring-issue-templates-for-your-repository>)
查看原始来源