

本文属于机器翻译版本。若本译文内容与英语原文存在差异，则一律以英文原文为准。

# GitHub 版 Amazon Q 开发者版（预览版）
<a name="amazon-q-for-github"></a>

**注意**  
GitHub 版 Amazon Q 开发者版目前处于预览发布阶段，功能可能会发生变更。

通过 [GitHub 版或 GitHub 企业云版 Amazon Q 开发者版](https://github.com/marketplace/amazon-q-developer)，您可以在软件开发工作流中利用 Amazon Q 开发者版的功能。借助专业的开发代理，您可以实施新想法，查看代码中是否存在质量问题，并通过单元测试来解决漏洞。代理完成任务后，您可以提供反馈，代理会基于之前的解决方案进行迭代优化。有关更多信息，请参阅 [Amazon Q 开发者版代理](#github-agents)。

您可以通过 [https://github.com/marketplace/amazon-q-developer](https://github.com/marketplace/amazon-q-developer) 访问 Amazon Q 开发者版集成，并授权其访问您所在组织的存储库。要开始使用 GitHub 版 Amazon Q 开发者版，请参阅[快速入门：安装、在 GitHub 中使用功能及提高使用限制](github-quickstart.md)。

**重要**  
要安装 Amazon Q 开发者版应用程序并授权其访问 GitHub 存储库，您必须满足 GitHub 组织的相关要求。有关更多信息，请参阅《GitHub 文档》**中的[安装 GitHub 应用程序的要求](https://docs.github.com/en/enterprise-cloud@latest/apps/using-github-apps/installing-a-github-app-from-a-third-party#requirements-to-install-a-github-app)和[组织中的角色](https://docs.github.com/en/organizations/managing-peoples-access-to-your-organization-with-roles/roles-in-an-organization)。

**注意**  
Amazon Q 开发者版与 GitHub 的集成会在美国境内处理数据。有关更多信息，请参阅[在 Amazon Q 开发者中Cross-region 进行处理](https://docs.aws.amazon.com/amazonq/latest/qdeveloper-ug/cross-region-processing.html)。

**注意**  
适用于 GitHub 的 Amazon Q 开发者版（预览版）目前不会使用您的内容来改进服务。如果我们将来启用此功能，我们将向您提供充分的通知以及供您不选择此类用途的方式。

**Topics**
+ [安装 Amazon Q 开发者版应用程序并授权访问](#github-concepts-set-up)
+ [Amazon Q 开发者版代理](#github-agents)
+ [注册应用程序安装](#github-concepts-register-app-install)
+ [在中 GitHub 使用浏览器扩展程序](#github-concepts-extensions)
+ [在 GitHub 问题和拉取请求中使用斜杠命令](#github-slash-commands)
+ [快速入门：安装、在 GitHub 中使用功能及提高使用限制](github-quickstart.md)
+ [在 GitHub 中使用 Amazon Q 开发者版开发功能并迭代](github-feature-development.md)
+ [在 GitHub 中使用 Amazon Q 开发者版进行代码审查](github-code-reviews.md)
+ [在 Amazon Q 开发者版控制台中提高使用限额并配置的详细信息](github-register-app-install.md)
+ [配置已注册的安装详情](github-configuration.md)
+ [GitHub 版 Amazon Q 开发者版故障排查](github-troubleshooting.md)

## 安装 Amazon Q 开发者版应用程序并授权访问
<a name="github-concepts-set-up"></a>

作为GitHub组织管理员，您可以免费安装和配置 Amazon Q De [https://github.com/apps/amazon-q-developer](https://github.com/apps/amazon-q-developer)veloper 应用程序，而无需设置 AWS 账户即可开始使用。在安装过程中，您可以选择向该应用程序授予对 GitHub 组织中所有或选定存储库的访问权限。完成安装和授权后，您就能在 GitHub 中免费使用 Amazon Q 开发者版的功能。若要提升免费使用额度，可在 [Amazon Q 开发者版控制台](https://us-east-1.console.aws.amazon.com/amazonq/developer/home#/github)中注册该应用安装。有关更多信息，请参阅 [快速入门：安装、在 GitHub 中使用功能及提高使用限制](github-quickstart.md)。

**重要**  
要安装 Amazon Q 开发者版应用程序并授权其访问 GitHub 存储库，您必须满足 GitHub 组织的相关要求。有关更多信息，请参阅《GitHub 文档》**中的[安装 GitHub 应用程序的要求](https://docs.github.com/en/enterprise-cloud@latest/apps/using-github-apps/installing-a-github-app-from-a-third-party#requirements-to-install-a-github-app)和[组织中的角色](https://docs.github.com/en/organizations/managing-peoples-access-to-your-organization-with-roles/roles-in-an-organization)。

**注意**  
如果您的 GitHub 企业组织已启用 IP 允许列表，则必须在 GitHub 应用程序中确认允许的 IP 地址。您也可以选择将这些 IP 地址自动添加到您的允许列表中。有关更多信息，请参阅《GitHub 文档》**中的[允许 GitHub 应用程序访问](https://docs.github.com/en/enterprise-cloud@latest/organizations/keeping-your-organization-secure/managing-security-settings-for-your-organization/managing-allowed-ip-addresses-for-your-organization#allowing-access-by-github-apps)和[启用允许的 IP 地址](https://docs.github.com/en/enterprise-cloud@latest/organizations/keeping-your-organization-secure/managing-security-settings-for-your-organization/managing-allowed-ip-addresses-for-your-organization#enabling-allowed-ip-addresses)。  
以下是用于访问您 GitHub 资源的 IP 地址：  

```
34.228.181.128
44.219.176.187
54.226.244.221
```

## Amazon Q 开发者版代理
<a name="github-agents"></a>

Amazon Q Developer 代理在整个软件开发生命周期中提供支持，从编码、测试和部署到故障排除。
+ **Amazon Q 开发代理**：创建问题并添加“功能开发”标签后，Amazon Q 开发者版会自动实现您的新功能和错误修复。Amazon Q 开发者版会创建一个包含代码更改及更改摘要的拉取请求。除应用标签外，您也可以在问题评论中使用 `/q dev` 斜杠命令来启动功能开发。有关更多信息，请参阅 [在 GitHub 中使用 Amazon Q 开发者版开发功能并迭代](github-feature-development.md)。
+ **Amazon Q 代码审查代理**：当新拉取请求创建或已关闭的拉取请求重新打开时，Amazon Q 开发者版会自动执行代码审查，并针对代码质量、潜在问题及安全隐患提供反馈。Amazon Q 开发者版还会为已识别的问题生成修复方案，您可查看并选择是否将其提交到拉取请求中。代码审查结果包含一份审查摘要，其中按主题分类列出问题。您可在拉取请求的评论中使用 `/q` 命令与 Amazon Q 开发者版交互，就代码审查中发现的问题提问。

  现有拉取请求内后续提交的代码不会触发自动审查。您可在拉取请求中使用 `/q review` 斜杠命令启动额外的代码审查。有关更多信息，请参阅 [在 GitHub 中使用 Amazon Q 开发者版进行代码审查](github-code-reviews.md)。

**重要**  
Amazon Q Developer 应用程序会尝试在您授权访问的GitHub存储库中自动创建 **Amazon Q 开发代理**标签。如果标签不是自动创建的，或者是无意中删除的，则可以在中手动创建GitHub。必须将该标签命名为 **Amazon Q 开发代理**，才能将其识别为 Amazon Q 开发者标签并进行处理。有关更多信息，请参阅《GitHub 文档》**中的[创建标签](https://docs.github.com/en/issues/using-labels-and-milestones-to-track-work/managing-labels#creating-a-label)。

## 注册应用程序安装
<a name="github-concepts-register-app-install"></a>

Amazon Q 开发者版与 GitHub 的集成可免费使用，无需先设置 AWS 账户即可开始。每月为你提供的功能开发调用次数有限，而且每月用于代码审查的行数也很有限。若要提升免费使用额度，可将您的 Amazon Q 开发者版应用程序安装与 AWS 账户进行注册绑定。有关更多信息，请参阅 [在 Amazon Q 开发者版控制台中提高使用限额并配置的详细信息](github-register-app-install.md)。

**重要**  
要在 Amazon Q 开发者版控制台中注册应用程序安装，您必须满足 GitHub 组织的相关要求。有关更多信息，请参阅《GitHub 文档》**中的[安装 GitHub 应用程序的要求](https://docs.github.com/en/enterprise-cloud@latest/apps/using-github-apps/installing-a-github-app-from-a-third-party#requirements-to-install-a-github-app)和 [OAuth 应用程序与组织](https://docs.github.com/en/apps/oauth-apps/using-oauth-apps/authorizing-oauth-apps#oauth-apps-and-organizations)。

## 在中 GitHub 使用浏览器扩展程序
<a name="github-concepts-extensions"></a>

您可以在支持的浏览器中使用 Amazon Q Developer 扩展程序，在GitHub问题中快速添加用于功能开发的标签，而无需搜索标签菜单。

Amazon Q 开发者版扩展程序支持以下浏览器：
+ [Google Chrome](https://chromewebstore.google.com/detail/amazon-q-github-issue-hel/oefafjbablenakmhacfllkmpaeabnnfi)
+ [Mozilla Firefox](https://addons.mozilla.org/en-US/firefox/addon/amazon-q-github-issue-helper)
+ [Microsoft Edge](https://microsoftedge.microsoft.com/addons/detail/amazon-q-github-issue-helper/poghackjbfhejeppjaegbnblangjbmmc)

## 在 GitHub 问题和拉取请求中使用斜杠命令
<a name="github-slash-commands"></a>

您可以在 GitHub 问题或拉取请求的评论中使用斜杠命令，调用 Amazon Q 开发者版执行开发任务或提供支持。
+ `/q dev`：在 GitHub 问题中调用 Amazon Q 开发者版，自动实现新功能和错误修复。Amazon Q 开发者版会创建一个包含代码更改及更改摘要的拉取请求。
+ `/q review`：调用 Amazon Q 开发者版，在拉取请求创建或重新打开时自动执行代码审查。代码审查会针对代码质量、潜在问题及安全隐患提供反馈，同时给出建议修复方案，并生成按主题分类列出问题的审查摘要。在拉取请求评论中使用 `/q` 可与审查发现的问题进行交互。现有拉取请求后续提交的代码不会触发自动审查。
+ `/q help`：提供 GitHub 版 Amazon Q 开发者版的相关信息，包括斜杠命令、功能、自定义详情，以及指向《Amazon Q 开发者版指南》**中 [GitHub 版 Amazon Q 开发者版（预览版）](#amazon-q-for-github) 文档的链接。