> ## Documentation Index
> Fetch the complete documentation index at: https://docs.fetchhive.com/llms.txt
> Use this file to discover all available pages before exploring further.

# GitHub

> 让代理访问你已连接的 GitHub 账户

# GitHub

代理可以通过已连接的账户创建和更新 issue、评论、标签和受让人。它还可以查找 pull request、请求审阅者、检查合并状态，并管理工作流运行。

## 它的作用

当代理启用 GitHub 后，它可以在推理过程中执行 GitHub 操作。你提出问题或给它一个任务，代理会决定何时以及如何使用你的 GitHub 账户代表你执行操作。

## 前提条件

在启用此工具之前，你的工作区中必须已有一个处于活动状态的 GitHub 连接。如果没有活动连接，该开关将被禁用。

1. 前往你工作区中的 **Integrations**。
2. 在集成网格中找到 **GitHub**。
3. 点击 **Connect** 并完成登录流程。
4. 返回你的代理并启用该工具。

## 将工具添加到代理

1. 在编辑器中打开一个代理。
2. 点击带有工具提示 **Add MCP Tool or Sub Agent** 的按钮。
3. 在 **MCP Tools** 中，点击 **GitHub**。GitHub 节点会出现在画布上。
4. 点击该节点，在右侧打开 **Settings** 面板。
5. 在 **Authentication** 字段中，选择代理应使用的已连接 GitHub 账户。
6. 如果未找到活动连接，设置面板会显示一条警告，并提供一个指向 **Integrations** 的链接，先去连接。

## 使用场景

* 处理一个新的 bug 报告
* 审查一个 pull request
* 关闭已解决的工作

## 注意事项

* 代理会使用你已连接的 GitHub 账户来执行操作。
* 该工具会为代理执行的每个操作计为 1 个 credit。
* 登录界面可能会显示第三方授权品牌信息。

另请参阅：[Integrations](https://docs.fetchhive.com/zh/workspace/integrations.md), [Creating and Configuring](https://docs.fetchhive.com/zh/agents/creating-and-configuring.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.