Skip to main content

此版本的 GitHub Enterprise 将停止服务 2022-06-03. 即使针对重大安全问题,也不会发布补丁。 要获得更好的性能、改进的安全性和新功能,请升级到 GitHub Enterprise 的最新版本。 如需升级方面的帮助,请联系 GitHub Enterprise 支持

Managing labels

You can classify issues and pull requests by creating, editing, applying, and deleting labels.

About labels

You can manage your work on GitHub Enterprise Server by creating labels to categorize issues and pull requests. You can apply labels in the repository the label was created in. Once a label exists, you can use the label on any issue or pull request within that repository.

About default labels

GitHub Enterprise Server provides default labels in every new repository. You can use these default labels to help create a standard workflow in a repository.

LabelDescription
bugIndicates an unexpected problem or unintended behavior
documentationIndicates a need for improvements or additions to documentation
duplicateIndicates similar issues or pull requests
enhancementIndicates new feature requests
good first issueIndicates a good issue for first-time contributors
help wantedIndicates that a maintainer wants help on an issue or pull request
invalidIndicates that an issue or pull request is no longer relevant
questionIndicates that an issue or pull request needs more information
wontfixIndicates that work won't continue on an issue or pull request

Default labels are included in every new repository when the repository is created, but you can edit or delete the labels later.

Issues with the good first issue label are used to populate the repository's contribute page. For an example of a contribute page, see github/docs/contribute.

Organization owners can customize the default labels for repositories in their organization. For more information, see "Managing default labels for repositories in your organization."

Creating a label

Anyone with write access to a repository can create a label.

  1. 在 您的 GitHub Enterprise Server 实例 上,导航到仓库的主页面。
  2. 在仓库名称下,单击 Issues(议题) Pull requests(拉取请求)议题和拉取请求选项卡选择
  3. 在议题列表或拉取请求上方,单击 Labels(标签)资源库议题或拉取请求页面上的标签选项卡
  4. To the right of the search field, click New label.
  5. 在“Label name(标签名称)”下,输入标签名称。 标签名称输入字段
  6. 在“Description(描述)”下,输入描述以帮助他人理解和使用您的标签。 标签描述输入字段
  7. (可选)您可以自定义标签的颜色,编辑十六进制数字,或点击刷新按钮以进行另一次随机选择。 议题新标签颜色刷新
  8. 要保存新标签,请单击 Create label(创建标签)

Applying a label

Anyone with triage access to a repository can apply and dismiss labels.

  1. Navigate to the issue or pull request.
  2. In the right sidebar, to the right of "Labels", click , then click a label. "Labels" drop-down menu

Editing a label

Anyone with write access to a repository can edit existing labels.

  1. 在 您的 GitHub Enterprise Server 实例 上,导航到仓库的主页面。
  2. 在仓库名称下,单击 Issues(议题) Pull requests(拉取请求)议题和拉取请求选项卡选择
  3. 在议题列表或拉取请求上方,单击 Labels(标签)资源库议题或拉取请求页面上的标签选项卡
  4. 在标签列表中您要编辑的标签右侧,单击 Edit(编辑)
  5. 在“Label name(标签名称)”下,输入标签名称。 标签名称输入字段
  6. 在“Description(描述)”下,输入描述以帮助他人理解和使用您的标签。 标签描述输入字段
  7. (可选)您可以自定义标签的颜色,编辑十六进制数字,或点击刷新按钮以进行另一次随机选择。 议题新标签颜色刷新
  8. 单击 Save changes(保存更改)

Deleting a label

Anyone with write access to a repository can delete existing labels.

Deleting a label will remove the label from issues and pull requests.

  1. 在 您的 GitHub Enterprise Server 实例 上,导航到仓库的主页面。
  2. 在仓库名称下,单击 Issues(议题) Pull requests(拉取请求)议题和拉取请求选项卡选择
  3. 在议题列表或拉取请求上方,单击 Labels(标签)资源库议题或拉取请求页面上的标签选项卡
  4. 在标签列表中您要删除的标签右侧,单击 Delete(删除)

Further reading