跳至主要内容

参与讨论

您可以在 GitHub 项目仓库内的论坛中与社区成员和维护者进行交流。

谁可以使用此功能?

拥有仓库读取权限的用户可以参与该仓库中的讨论和投票。拥有组织讨论来源仓库读取权限的用户可以参与该组织中的讨论和投票。

关于参与讨论

GitHub Discussions 是一个开放的论坛,供仓库或组织的维护者与社区进行交流。欲了解更多信息,请参阅 关于讨论

除了创建或查看讨论和投票之外,您还能

  • 对讨论发起者的原始评论进行回复
  • 通过回复讨论中其他社区成员的单条评论来创建评论线程
  • 使用表情符号对评论作出回应
  • 为讨论和顶层评论点赞,以提升其可见度

您可以屏蔽用户并举报扰乱内容,以保持安全愉快的环境。如需了解更多信息,请参阅 维护您在 GitHub 上的安全

提示

您也可以使用 Copilot Chat 根据您近期的拉取请求和议题生成讨论的创意、提纲或草稿。请参阅 撰写讨论或博文

先决条件

必须为仓库或组织启用 GitHub Discussions,您才能在相应的仓库或组织中参与讨论。欲了解更多信息,请参阅 为仓库启用或禁用 GitHub Discussions为组织启用或禁用 GitHub Discussions

创建讨论

  1. 在 GitHub 上,前往您想要发起讨论的仓库或组织的主页。

  2. 在你的仓库或组织名称下,点击 讨论

    Screenshot of the tabs in a GitHub repository. The "Discussions" option is outlined in dark orange.

  3. 在页面右侧,点击 新建讨论

  4. 点击 开始 选择讨论类别。

    Screenshot of the "Select a discussion category" page. A button, labeled "Get started", is outlined in dark orange.

  5. 在“讨论标题”下输入讨论的标题,在“撰写”下输入讨论的正文。

    Screenshot of the text fields for the title and body for a new discussion.

  6. 单击 Start discussion

创建投票

  1. 在 GitHub 上,导航至仓库的主页面。

  2. 在你的仓库或组织名称下,点击 讨论

    Screenshot of the tabs in a GitHub repository. The "Discussions" option is outlined in dark orange.

  3. 在分类列表中,点击 投票

    Screenshot of the categories section in the "Discussions" tab. The "Poll" category is outlined in dark orange.

  4. 在右侧,点击 新建讨论

  5. 在“讨论标题”下输入标题,可选地,在“撰写”下输入投票的正文。

    Screenshot of the page to start a new poll.

  6. 在“投票问题”下输入投票的提问。

  7. 在“投票选项”下输入至少两个选项。

  8. 可选地,若要添加额外的投票选项,点击 添加选项

    Screenshot of the page to start a new poll. The plus icon and "Add an option" are outlined in dark orange.

  9. 点击 开始投票

将评论标记为答案

讨论作者以及拥有仓库 triage 角色或更高权限的用户可以将评论标记为该仓库中讨论的答案。同样,组织讨论的来源仓库的讨论作者以及拥有 triage 角色或更高权限的用户可以将评论标记为该组织中讨论的答案。

如果讨论所在的分类接受答案,您可以将讨论中的评论标记为答案。有关更多信息,请参阅 关于讨论

当您将问题标记为答案时,GitHub 会高亮该评论及其回复,以帮助访客快速找到答案。

Screenshot of a comment marked as the answer to a discussion.

您也可以将线索评论(对某条评论的回复)标记为讨论的答案。已最小化的评论无法标记为答案。

  1. 在 GitHub 上,导航至仓库或组织的主页。

  2. 在你的仓库或组织名称下,点击 讨论

    Screenshot of the tabs in a GitHub repository. The "Discussions" option is outlined in dark orange.

  3. 在讨论列表中,点击您想标记为已回答的未回答讨论。

    Screenshot of the list of discussions with an unanswered discussion.

  4. 在讨论中,找到您想标记为答案的评论。

  5. 在评论下方,点击 标记为答案

    Screenshot of a discussion comment. A button, labeled "Mark as answer", is outlined in dark orange.

  6. 如需取消标记,请点击 取消标记为答案

为讨论点赞

您可以为讨论点赞,以提升您关心的话题的可见度,并对讨论进行排序,查看哪些讨论获得的点赞最多。有关讨论排序的更多信息,请参阅 与维护者协作使用讨论

  1. 在 GitHub 上,导航至仓库的主页面。

  2. 在你的仓库或组织名称下,点击 讨论

    Screenshot of the tabs in a GitHub repository. The "Discussions" option is outlined in dark orange.

  3. 在讨论列表中,找到您想点赞的讨论。

  4. 在讨论左侧,点击点赞箭头。

    Screenshot of the discussion list. A button, labeled with an upwards arrow and "5", is outlined in dark orange.

  5. 如需取消点赞,请再次点击点赞箭头。

为评论点赞

您可以为讨论中的顶层评论点赞,并对顶层评论进行排序,以查看哪些评论获得的点赞最多。有关评论排序的更多信息,请参阅 与维护者协作使用讨论

  1. 在 GitHub 上,导航至仓库的主页面。

  2. 在你的仓库或组织名称下,点击 讨论

    Screenshot of the tabs in a GitHub repository. The "Discussions" option is outlined in dark orange.

  3. 在讨论列表中,点击您想查看的讨论。

  4. 在讨论中,找到您想点赞的顶层评论。

  5. 点击评论左下角的点赞箭头。

    Screenshot of the top-level comment on a discussion. A button, labeled with an upwards arrow and "1", is outlined in dark orange.

  6. 如需取消点赞,请再次点击点赞箭头。

© . This site is unofficial and not affiliated with GitHub, Inc.