

# Amazon Q Developer for GitHub (Preview)
<a name="amazon-q-for-github"></a>

**Note**  
Amazon Q Developer for GitHub is in preview release and is subject to change.

[Amazon Q Developer for GitHub or GitHub Enterprise Cloud](https://github.com/marketplace/amazon-q-developer) allows you to leverage Amazon Q Developer capabilities for your software development workflows. With specialized development agents, you can implement new ideas, review code for quality issues, and address vulnerabilities with unit tests. Once the agent completes a task, you can provide feedback, and the agent iterates on the previous solution. For more information, see [Amazon Q Developer agents](#github-agents).

You can access the Amazon Q Developer integration through [https://github.com/marketplace/amazon-q-developer](https://github.com/marketplace/amazon-q-developer) and authorize it to provide access to your organization's repositories. To get started with Amazon Q Developer for GitHub, see [Quickstart: Installing, using features in GitHub, and increasing usage limits](github-quickstart.md).

**Important**  
To install the Amazon Q Developer app and authorize access to GitHub repositories, you must meet the requirements for the GitHub organization. For more information, see [Requirements to install a GitHub App](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) and [Roles in organization](https://docs.github.com/en/organizations/managing-peoples-access-to-your-organization-with-roles/roles-in-an-organization) in the *GitHub documentation*.

**Note**  
The Amazon Q Developer integration with GitHub processes data in the United States. For more information, see [Cross-region processing in Amazon Q Developer](https://docs.aws.amazon.com/amazonq/latest/qdeveloper-ug/cross-region-processing.html).

**Note**  
Amazon Q Developer for GitHub (Preview) does not currently use your content for service improvement. If we enable this in the future, we will provide you with adequate notice and a way for you to opt out of such use.

**Topics**
+ [Installing Amazon Q Developer app and authorizing access](#github-concepts-set-up)
+ [Amazon Q Developer agents](#github-agents)
+ [Registering app installation](#github-concepts-register-app-install)
+ [Using browser extensions in GitHub](#github-concepts-extensions)
+ [Using slash commands in GitHub issues and pull requests](#github-slash-commands)
+ [Quickstart: Installing, using features in GitHub, and increasing usage limits](github-quickstart.md)
+ [Developing features and iterating with Amazon Q Developer in GitHub](github-feature-development.md)
+ [Reviewing code with Amazon Q Developer in GitHub](github-code-reviews.md)
+ [Increasing usage limits and configuring details in Amazon Q Developer console](github-register-app-install.md)
+ [Configuring registered installation details](github-configuration.md)
+ [Troubleshooting issues for Amazon Q Developer for GitHub](github-troubleshooting.md)

## Installing Amazon Q Developer app and authorizing access
<a name="github-concepts-set-up"></a>

As a GitHub organization administrator, you can install and configure the Amazon Q Developer app from [https://github.com/apps/amazon-q-developer](https://github.com/apps/amazon-q-developer) for free without the need to set up an AWS account to get started. During the installation process, you choose to provide access to all or selected repositories in your GitHub organization. After installing and authorizing, you have access to free usage for the Amazon Q Developer features in GitHub. You can increase free usage by registering the app installation in the [Amazon Q Developer console](https://us-east-1.console.aws.amazon.com/amazonq/developer/home#/github). For more information, see [Quickstart: Installing, using features in GitHub, and increasing usage limits](github-quickstart.md).

**Important**  
To install the Amazon Q Developer app and authorize access to GitHub repositories, you must meet the requirements for the GitHub organization. For more information, see [Requirements to install a GitHub App](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) and [Roles in organization](https://docs.github.com/en/organizations/managing-peoples-access-to-your-organization-with-roles/roles-in-an-organization) in the *GitHub documentation*.

**Note**  
If your GitHub enterprise organization has enabled IP allowlisting, you must accept the allowed IP addresses on the GitHub app. You can also choose to automatically add the IP addresses to your allow list. For more information, see [Allowing access by GitHub Apps](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) and [Enabling allowed IP addresses](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) in the *GitHub documentation*.  
The following IP addresses are used to access your GitHub resources:  

```
34.228.181.128
44.219.176.187
54.226.244.221
```

## Amazon Q Developer agents
<a name="github-agents"></a>

Amazon Q Developer agents provide support across the software development lifecycle from coding, testing, and deploying to troubleshooting.
+ **Amazon Q development agent** – After creating an issue and adding the feature development label, Amazon Q Developer automatically implements your new features and bug fixes. Amazon Q Developer creates a pull request with the changes and a summary of the changes. Instead of applying a label, you can also initiate feature development with the `/q dev` slash command in a comment of the issue. For more information, see [Developing features and iterating with Amazon Q Developer in GitHub](github-feature-development.md).
+ **Amazon Q code review agent** – When a new pull request is created or a closed pull request is reopened, Amazon Q Developer automatically performs a code review and provides feedback on code quality, potential issues, and security concerns. Amazon Q Developer also generates fixes for the identified issues, which you can review and choose to commit to the pull request. The code review includes a code review summary with threaded findings. You can interact with Amazon Q Developer by using the `/q` command in pull request comments to ask questions about the code review findings.

  Automatic code reviews are not triggered by subsequent commits made within an existing pull request. You can initiate additional code reviews within pull requests with the `/q review` slash command. For more information, see [Reviewing code with Amazon Q Developer in GitHub](github-code-reviews.md).

**Important**  
The Amazon Q Developer app attempts to automatically create the **Amazon Q development agent** label in GitHub repositories you authorize access to. If the label is not automatically created, or if it's unintentionally deleted, you can manually create it in GitHub. The label must be named as **Amazon Q development agent** in order for it to be recognized and processed as a Amazon Q Developer label. For more information, see [Creating a label](https://docs.github.com/en/issues/using-labels-and-milestones-to-track-work/managing-labels#creating-a-label) in the *GitHub documentation*.

## Registering app installation
<a name="github-concepts-register-app-install"></a>

The Amazon Q Developer integration for GitHub is available for free without the need to set up an AWS account to get started. You're provided with limited invocations per month for feature development, as well as limited number of lines for code reviews per month. You can increase free usage by registering your Amazon Q Developer app installation with your AWS account. For more information, see [Increasing usage limits and configuring details in Amazon Q Developer console](github-register-app-install.md).

**Important**  
To register the app installation in the Amazon Q Developer console, you must meet the requirements for the GitHub organization. For more information, see [Requirements to install a GitHub App](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) and [OAuth apps and organizations](https://docs.github.com/en/apps/oauth-apps/using-oauth-apps/authorizing-oauth-apps#oauth-apps-and-organizations) in the *GitHub documentation*.

## Using browser extensions in GitHub
<a name="github-concepts-extensions"></a>

You can use the Amazon Q Developer extension in a supported browser to quickly add a label for feature development in GitHub issues without having to search through label menus.

The Amazon Q Developer extension is available for the following browsers:
+ [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)

## Using slash commands in GitHub issues and pull requests
<a name="github-slash-commands"></a>

You can use slash commands in comments within GitHub issues or pull requests to invoke Amazon Q Developer to perform development tasks or provide support.
+ `/q dev` - Invokes Amazon Q Developer in a GitHub issue to automatically implement new features and bug fixes. Amazon Q Developer creates a pull request with the changes and a summary of the changes.
+ `/q review` - Invokes Amazon Q Developer to automatically perform code reviews when pull requests are created or reopened. Code reviews provide feedback on code quality, potential issues, and security concerns, along with suggested fixes and code review summaries with threaded findings. Use `/q` in pull request comments to interact with findings. Automatic reviews are not triggered by subsequent commits to existing pull requests.
+ `/q help` - Provides information about Amazon Q Developer for GitHub, including slash comannds, features, customization details, as well as a link to the [Amazon Q Developer for GitHub (Preview)](#amazon-q-for-github) documentation in the *Amazon Q Developer Developer Guide*.

# Quickstart: Installing, using features in GitHub, and increasing usage limits
<a name="github-quickstart"></a>

**Note**  
Amazon Q Developer for GitHub is in preview release and is subject to change.

This tutorial provides a walkthrough of the following tasks:

1. Install the Amazon Q Developer app from the GitHub Marketplace and provide access to your repositories.

1. Get started with Amazon Q Developer in an issue by adding a label for feature development, or by creating a new pull request for code review. Alternatively, you can use slash commands in issues to initiate feature development. You can also initiate additional code reviews within pull requests with a slash command.

1. (Optional) Register your Amazon Q Developer app installation with your AWS account to increase your usage limits.

## Step 1: Install Amazon Q Developer in GitHub and authorize access
<a name="github-quickstart-step-1"></a>

You can use Amazon Q Developer in GitHub free without the need to set up an AWS account to get started. The first step to using Amazon Q Developer in GitHub is to install the app from [https://github.com/marketplace/amazon-q-developer](https://github.com/marketplace/amazon-q-developer) . During this process, you can provide Amazon Q Developer access to all your GitHub repositories or selected repositories.

**Important**  
To install the Amazon Q Developer app and authorize access to GitHub repositories, you must meet the requirements for the GitHub organization. For more information, see [Requirements to install a GitHub App](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) and [Roles in organization](https://docs.github.com/en/organizations/managing-peoples-access-to-your-organization-with-roles/roles-in-an-organization) in the *GitHub documentation*.

**To install Amazon Q Developer and authorize access**

1. Navigate to the [Amazon Q Developer for GitHub app](https://github.com/marketplace/amazon-q-developer) page.

1. If necessary, sign in to your [https://github.com/](https://github.com/) account using your GitHub credentials.

1. Review the Amazon Q Developer app's overview and features, and then choose **Install**.

1. Do one of the following to configure access to your GitHub repositories:

   1. To provide access to all current and future repositories, choose **All repositories**.

   1. To provide access to specific repositories, choose **Only select repositories**, choose the **Select repositories** dropdown, and then choose a repository you want to allow to access to.

1. Choose **Install** to complete installing Amazon Q Developer in GitHub and authorizing it to access your repositories.

After installing the app in GitHub and authorizing access, you're redirected to the Amazon Q Developer overview page in GitHub. You can navigate to your GitHub repository to begin using the Amazon Q Developer features.

**Note**  
If your GitHub enterprise organization has enabled IP allowlisting, you must accept the allowed IP addresses on the GitHub app. You can also choose to automatically add the IP addresses to your allow list. For more information, see [Allowing access by GitHub Apps](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) and [Enabling allowed IP addresses](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) in the *GitHub documentation*.  
The following IP addresses are used to access your GitHub resources:  

```
34.228.181.128
44.219.176.187
54.226.244.221
```

## Step 2: Using Amazon Q Developer features in GitHub
<a name="github-quickstart-step-2"></a>

After installing the Amazon Q Developer app in GitHub and authorizing access to your repositories, you can begin using the Amazon Q Developer agents for support across the software development lifecycle from coding, testing, and deploying to troubleshooting applications. For more information, see one of the following:

**Important**  
The Amazon Q Developer app attempts to automatically create the **Amazon Q development agent** label in GitHub repositories you authorize access to. If the label is not automatically created, or if it's unintentionally deleted, you can manually create it in GitHub. The label must be named as **Amazon Q development agent** in order for it to be recognized and processed as a Amazon Q Developer label. For more information, see [Creating a label](https://docs.github.com/en/issues/using-labels-and-milestones-to-track-work/managing-labels#creating-a-label) in the *GitHub documentation*.
+ [Developing features and iterating with Amazon Q Developer in GitHub](github-feature-development.md)
+ [Reviewing code with Amazon Q Developer in GitHub](github-code-reviews.md)

## Step 3: Increase free usage limits and configure details
<a name="github-quickstart-step-3"></a>

You can use Amazon Q Developer agents in GitHub for free without the need to set up an AWS account to get started. You're provided with limited invocations per month for feature development and code review. You can increase your free usage at any time by registering your Amazon Q Developer app installation with your AWS account. Registering also provides with the ability to configure details such as disabling code reviews and adding tags for searching and filtering. For more information, see [Increasing usage limits and configuring details in Amazon Q Developer console](github-register-app-install.md).

**Important**  
To register the app installation in the Amazon Q Developer console, you must meet the requirements for the GitHub organization. For more information, see [Requirements to install a GitHub App](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) and [OAuth apps and organizations](https://docs.github.com/en/apps/oauth-apps/using-oauth-apps/authorizing-oauth-apps#oauth-apps-and-organizations) in the *GitHub documentation*.

# Developing features and iterating with Amazon Q Developer in GitHub
<a name="github-feature-development"></a>

**Note**  
Amazon Q Developer for GitHub is in preview release and is subject to change.

You can use Amazon Q Developer in GitHub to streamline development by automatically implementing new features and bug fixes, taking tasks from idea to a completed pull request. When you add the feature development label to an issue or use the `/q dev` slash command, Amazon Q Developer uses the issue, including its title and description, as well as repository code as context to generate new code fixes and create a pull request. On the pull request, you can provide feedback and Amazon Q Developer iterates on the suggested code.

You can have Amazon Q Developer perform feature development a limited number of times per month. You can increase your free usage at any time by registering your Amazon Q Developer app installation with your AWS account. For more information, see [Increasing usage limits and configuring details in Amazon Q Developer console](github-register-app-install.md).

**Important**  
The Amazon Q Developer app attempts to automatically create the **Amazon Q development agent** label in GitHub repositories you authorize access to. If the label is not automatically created, or if it's unintentionally deleted, you can manually create it in GitHub. The label must be named as **Amazon Q development agent** in order for it to be recognized and processed as a Amazon Q Developer label. For more information, see [Creating a label](https://docs.github.com/en/issues/using-labels-and-milestones-to-track-work/managing-labels#creating-a-label) in the *GitHub documentation*.

**To use Amazon Q Developer for feature development**

1. If necessary, sign in to your [https://github.com/](https://github.com/) account using your GitHub credentials.

1. Navigate to your GitHub organization, and then navigate to the repository you want to implement new features with Amazon Q Developer.

1. Choose **Issues**, and then create a new issue or choose an existing issue. For more information, see [Create an issue](https://docs.github.com/en/issues/tracking-your-work-with-issues/using-issues/creating-an-issue) in the *GitHub documentation*.

   1. For a new issue, in the **Add a title** text input field, enter a title that provides context to Amazon Q Developer for the feature development (example: "Create an image recognition app"). The issue description should also be included as it also provides context.

     For an existing issue, you can edit the issue title and description to provide context to Amazon Q Developer for the feature development. For more informaiton, see [Editing an issue](https://docs.github.com/en/issues/tracking-your-work-with-issues/using-issues/editing-an-issue) in the *GitHub documentation*.

1. When creating an issue or configuring an existing issue, you can apply the feature development Amazon Q Developer label or use the `/q dev` slash command. Do one of the following:
   + To apply the label to the issue, do one of the following:
     + Choose the **Assign to Amazon Q** dropdown menu provided as a browser extension, and then choose the **Amazon Q development agent** label.
     + In the right side menu, choose **Labels**, and then choose the **Amazon Q development agent** label.
   + To use the `/q dev` slash command in a comment:

     1. Within the issue, navigate to **Add a comment**, and in the comment text input field, enter `/q dev`.

     1. Choose **Comment**.

1. For a new issue, choose **Create issue** to finish creating the issue with the necessary details for Amazon Q Developer to develop features. If you configure an existing issue, ensure you save the changes. For more informaiton, see [Editing an issue](https://docs.github.com/en/issues/tracking-your-work-with-issues/using-issues/editing-an-issue) in the *GitHub documentation*.

   When Amazon Q Developer finishes generating code changes for the feature development, it comments on the issue and opens a pull request.

1. Navigate to the comment left by Amazon Q Developer (example: "`I finished the proposed code changes, and the pull request is ready for review: [PR link]`"), and then choose the pull request link.

   You can also navigate to the **Pull requests** tab, and then choose the pull request created by Amazon Q Developer.

1. Choose the **Files changed** tab to view the code changes.

1. If you're satisfied with the suggested code changes, you can merge the pull request. For more information, see [Merge a pull request](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/incorporating-changes-from-a-pull-request/merging-a-pull-request).

You can also review the pull request for the feature development and iterate on the suggested code changes by providing feedback to Amazon Q Developer.

**To iterate on Amazon Q Developer feature development code**

1. Choose the pull request created by Amazon Q Developer, and then choose the **Files changed** tab to view the code changes.

1. Optionally, for specific lines of code you want to provide feedback on, choose **\$1** to add a comment with feedback.

   In the conversation, you can use the `/q` command followed by your instructions in natural language (for example, `/q implement my suggestions` or `/q refactor this function for better performance`). Amazon Q Developer will respond with a comment describing the changes it will make based on your feedback (for example, "I will implement the following changes based on the feedback: ..."). When the implementation is complete, Amazon Q Developer will post another comment confirming the changes (for example, "I have implemented the suggested changes.") along with a link to the generated commit where you can view the changes.

1. Review the changes made by Amazon Q Developer by following the commit link provided in the conversation. You can continue to provide additional feedback using the `/q` command for further iterations as needed.

1. If you're satisfied with the updated code changes, you can merge the pull request or iterate on the code again with new feedback. For more information, see [Merge a pull request](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/incorporating-changes-from-a-pull-request/merging-a-pull-request).

# Reviewing code with Amazon Q Developer in GitHub
<a name="github-code-reviews"></a>

**Note**  
Amazon Q Developer for GitHub is in preview release and is subject to change.

Amazon Q Developer enables automated code reviews within GitHub. When you create a new pull request or reopen a closed pull request, Amazon Q Developer automatically performs a code review and provides feedback on code quality, potential issues, and high-severity findings. Each review includes a code review summary with threaded findings. Amazon Q Developer also generates fixes for the identified issues, which you can review and choose to commit to the pull request. You can use the `/q` command in pull request comments to ask questions and interact regarding the code review findings. Automatic code reviews are not triggered by subsequent commits made within an existing pull request.

**Note**  
The Code reviews feature setting in the Amazon Q Developer console controls automated code reviews that run when pull requests are created or reopened. Initiating code reviews using the `/q review` slash command in pull request comments is not affected by this setting.

You can also initiate code reviews within pull requests with the `/q review` slash command. The slash command can be added to a new pull request comment, which initiates a new code review of the pull request in its current state, including any comments and new commits. For more information, see [Initiating code reviews within GitHub pull requests](#github-code-reviews-in-pr).

You can have Amazon Q Developer perform a code review for a limited amount of lines per month. You can increase your free usage at any time by registering your Amazon Q Developer app installation with your AWS account. For more information, see [Increasing usage limits and configuring details in Amazon Q Developer console](github-register-app-install.md).

**Note**  
If the code review capability was previously disabled, it must be enabled in the [Amazon Q Developer console](https://us-east-1.console.aws.amazon.com/amazonq/developer/home#/github) before you can apply the label in GitHub. For more information, see [Editing features for Amazon Q Developer in GitHub](github-configuration.md#github-edit-features).

## Prerequisites
<a name="github-code-reviews-prerequisites"></a>

Before you can initiate code reviews with Amazon Q Developer, you need the appropriate permissions for the target GitHub repository. The supported repository roles are Write, Maintain, or Admin. Users with Read or Triage roles, as well as members without a role, cannot initiate code reviews with Amazon Q Developer.

GitHub users with the Triage role can still review pull requests in a repository. Any user, regardless of role, can review pull requests in public repositories.

For more information, see [Repository roles for organizations](https://docs.github.com/en/organizations/managing-user-access-to-your-organizations-repositories/managing-repository-roles/repository-roles-for-an-organization#repository-roles-for-organizations) and [About pre-defined organization roles](https://docs.github.com/en/organizations/managing-peoples-access-to-your-organization-with-roles/roles-in-an-organization#about-pre-defined-organization-roles) in the *GitHub documentation*.

## Initiating code reviews for GitHub pull requests
<a name="github-new-code-reviews-pr"></a>

When you open a new pull request or reopen a previously closed one, Amazon Q Developer automatically runs a code review and delivers feedback on code quality, possible problems, and critical findings.

**To use Amazon Q Developer for code reviews and apply fixes**

Before you start a review, you can customize a code quality review by defining custom coding standards in simple Markdown files in the `project-root/.amazonq/rules` directory. Amazon Q automatically follows your guidelines, ensuring consistent code quality across your entire project. For more information, see [Creating project rules for Amazon Q Developer in third-party platforms](third-party-context-project-rules.md).

1. If necessary, sign in to your [https://github.com/](https://github.com/) account using your GitHub credentials.

1. Navigate to your GitHub organization, and then navigate to the repository you want to perform a code review with Amazon Q Developer.

1. Create a new a pull request for changes made to your source code. For more information, see [Creating a pull request](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request) in the *GitHub documentation*.

   When you create a new pull request, Amazon Q Developer automatically begins a code review to find potential issues. Once Amazon Q Developer completes the review, it provides a code review summary. Each finding appears as a threaded comment under the summary, along with suggested fixes that you can commit to the pull request.

1. Ask the agent to implement changes and create commits directly on your pull request's source branch. You can do this by posting a comment starting with `/q` and followed by your request in natural language for the agent to make changes.

1. (Optional) Ask questions about specific findings. Within the pull request, navigate to **Add a comment**, and in the comment text input field, enter `/q` followed by your question (for example, "`/q explain the importance of this finding`").

1. Review the proposed code changes by Amazon Q Developer, choose **Commit suggestion**, and then choose **Commit changes** to update the pull request.

1. If you're satisfied with the suggested code fixes, you can merge the pull request to apply the code changes suggested by Amazon Q Developer. For more information, see [Merging a pull request](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/incorporating-changes-from-a-pull-request/merging-a-pull-request) in the *GitHub documentation*.

## Initiating code reviews within GitHub pull requests
<a name="github-code-reviews-in-pr"></a>

After an automatic code review performed by Amazon Q Developer for a new or reopened GitHub pull request, you can initiate additional code reviews to iterate on your code using the `/q review` slash command. The code review is performed on the entire pull request's diff.

**Note**  
You can only initiate a code review within a pull request with a new comment. The `/q review` slash command will not work in an existing comment thread. Initiating a code review using the `/q review` slash command is not affected by the Code reviews feature setting in the Amazon Q Developer console.

**To use initiate code reviews in a pull request**

1. If necessary, sign in to your [https://github.com/](https://github.com/) account using your GitHub credentials.

1. Navigate to your GitHub organization, and then navigate to the pull request you want to perform a code review with Amazon Q Developer. For more information, see [About pull requests](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-pull-requests).

1. Within the pull request, navigate to **Add a comment**, and in the comment text input field, enter `/q review`.

1. Choose **Comment** to initiate the code review.

   It can take a few minutes for Amazon Q Developer to complete analyzing the pull request code. After Amazon Q Developer finishes analyzing, it provides a code review summary. Each finding appears as a threaded comment under the summary, along with proposed changes you can choose to commit and update the pull request.

1. (Optional) Ask questions about specific findings. Within the pull request, navigate to **Add a comment**, and in the comment text input field, enter `/q` followed by your question (for example, "`/q explain the importance of this finding`").

1. If you're satisfied with the suggested code fixes, you can merge the pull request to apply the code changes suggested by Amazon Q Developer. For more information, see [Merging a pull request](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/incorporating-changes-from-a-pull-request/merging-a-pull-request) in the *GitHub documentation*.

# Increasing usage limits and configuring details in Amazon Q Developer console
<a name="github-register-app-install"></a>

**Note**  
Amazon Q Developer for GitHub is in preview release and is subject to change.

You can use Amazon Q Developer agents in GitHub for free without the need to set up an AWS account to get started. You're provided with limited invocations per month for the feature development and code review capabilities. You can increase your free usage at any time by registering your Amazon Q Developer app installation with your AWS account.

By default, the **Code reviews** and **Feature development** features are enabled in GitHub when you install the app. You can disable any of these features when you register. Registering requires an Amazon Q Developer profile to manage the features from the console. The profile stores your settings and code recommendation customization.

**Important**  
To register the app installation in the Amazon Q Developer console, you must meet the requirements for the GitHub organization. For more information, see [Requirements to install a GitHub App](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) and [OAuth apps and organizations](https://docs.github.com/en/apps/oauth-apps/using-oauth-apps/authorizing-oauth-apps#oauth-apps-and-organizations) in the *GitHub documentation*.

**To register your Amazon Q Developer installation**

1. Navigate to the [Amazon Q Developer console](https://us-east-1.console.aws.amazon.com/amazonq/developer/home).

1. Choose **Enable Q Developer** at the top of the page, and follow the prompts to enable Kiro and Amazon Q Developer.

   If you previously enabled Kiro and Amazon Q Developer, skip to step 3.

1. In the navigation pane, choose **Amazon Q Developer in GitHub**.

1. Choose **Register installation**, and then choose **Authorize** to be directed to GitHub.

   If you previously authorized Amazon Q Developer to access your GitHub organization, you'll be redirected back to the Amazon Q Developer console. In this case, skip to step 7.

1. Sign in to your GitHub account using your GitHub credentials. If you have multiple accounts, choose the account where you want to provide access to Amazon Q Developer.

1. Choose **Authorize Amazon Q Developer** to provide access to your GitHub account. You'll be redirected back to Amazon Q Developer console after the authorization.

1. Under **Registration details**, enter your GitHub details, optionally configure the code reviews feature, and add tags.

   1. In the **Registration name** text input filed, enter a name for your app installation.

   1. (Optional) In the **Organization name - *optional*** text input field, enter a name for the organization associated with the app installation.

   1. (Optional) Under **Features**, configure the **Code reviews** feature by choosing the toggle to enable or disable the feature. **Feature development** configuration cannot be modified, and is enabled by default.

   1. (Optional) Under **Tags - optional**, choose **Add new tag** to add a tag that can help to search and filter your AWS resources in GitHub.

1. Choose **Register** to register your app installation in GitHub with your AWS account.

After successfully registering the app installation, you can view the registration details. You can still enable or disable the code reviews feature, as well as add tags at a later time. You can also delete the registration. For more information, see [Configuring registered installation details](github-configuration.md).

# Configuring registered installation details
<a name="github-configuration"></a>

**Note**  
Amazon Q Developer for GitHub is in preview release and is subject to change.

After you create an Amazon Q Developer profile and register the app installation in GitHub, you can do the following from the Amazon Q Developer console:
+ Enable or disable the use of code reviews. Feature development configuration cannot currently be modified.
+ Find links to browser extensions that provide a way to add Amazon Q Developer feature labels in the GitHub issues.
+ Add tags to search and filter your resources or track AWS costs.
+ Delete a GitHub app installation registration.

## Editing features for Amazon Q Developer in GitHub
<a name="github-edit-features"></a>

The features available for Amazon Q Developer in GitHub are enabled by default when you install the app in GitHub and provide authorization to access your organization. You can choose to disable a feature if you no longer want to use the feature in GitHub.

**To enable or disable a feature for Amazon Q Developer in GitHub**

1. Navigate to the [Amazon Q Developer console](https://us-east-1.console.aws.amazon.com/amazonq/developer/home#/github).

1. In the navigation pane, under **Amazon Q Developer in GitHub**, choose **Registered installations**.

1. Under the **Name** column, choose the registration name for the installation you want to enable or disable a feature.

1. Under **Features**, choose **Edit** to configure the feature availability.

1. In the modal, choose the toggle for the feature you want to enable or disable, and then choose **Save** to confirm the changes.

After enabling or disabling a feature in the [Amazon Q Developer console](https://us-east-1.console.aws.amazon.com/amazonq/developer/home#/github), the changes are reflected in GitHub. Attempting to assign an issue to a Amazon Q Developer label after disabling the feature will lead to an error. Code reviews will no longer take place in new pull requests if the feature is disabled.

## Installing browser extensions
<a name="github-extensions"></a>

You can install the Amazon Q Developer extension in one of the supported browsers. The extension enables you to quickly assign feature development tasks to Amazon Q Developer in GitHub issues without having to search through label menus.

The Amazon Q Developer extension is available for the following browsers:
+ [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)

You can also view the supported browsers on the registration installation details page in the [Amazon Q Developer console](https://us-east-1.console.aws.amazon.com/amazonq/developer/home#/github).

## Deleting Amazon Q Developer GitHub app installation registration
<a name="github-delete-app-install"></a>

You can delete a registration for one or more of your GitHub app installation through the Amazon Q Developer console. After permanently deleting your registration, all data associated with the registration is also deleted. The action can't be undone.

**To delete your GitHub app installation**

1. Navigate to the [Amazon Q Developer console](https://us-east-1.console.aws.amazon.com/amazonq/developer/home#/github).

1. In the navigation pane, under **Amazon Q Developer in GitHub**, choose **Registered installations**.

1. Do one of the following:
   + Under the **Actions** column, choose **Delete registration** for the installation you want to delete.
   + Under the **Name** column, choose the registration name for the installation you want to delete, and the choose **Delete**.

   Under the **Actions** column, choose **Delete registration** for registered installation you want to delete.

1. In the modal, review the details for deleting registration.

1. In the text input field, enter **confirm**, and then choose **Delete** to confirm the changes.

Once you delete a GitHub app installation, you can choose to register a new installation.

# Troubleshooting issues for Amazon Q Developer for GitHub
<a name="github-troubleshooting"></a>

Consult the following section to troubleshoot common problems when using Amazon Q Developer for GitHub.

## Amazon Q Developer not generating pull requests in repositories with branch protection rules
<a name="github-troubleshooting-branch-protection"></a>

**Problem**: Amazon Q Developer isn't able to create a pull request in my GitHub repository, which has branch protection rules.

**Solution**: The branch protection rules prevents Amazon Q Developer from creating a branch to create a pull request. In order to use Amazon Q Developer for GitHub in repositories with branch protection rules, you need to add the Amazon Q Developer app to your allow list.

**To add the Amazon Q Developer app to your allow list**

1. If necessary, sign in to your [https://github.com/](https://github.com/) account using your GitHub credentials.

1. Navigate to your GitHub organization, and then navigate to the repository you want to allow list the Amazon Q Developer for GitHub app.

1. Choose **Settings**, and then choose **Branches** from the navigation pane.

1. Under **Branch protection rules**, choose **Edit** to modify the branch protection rules.

1. Choose **Restrict pushes that create matching branches**, and search for the Amazon Q Developer for GitHub app.

1. Choose **Save changes** to allow Amazon Q Developer to create pull requests for issues with Amazon Q Developer labels.

To learn more about modifying branch protection rules in GitHub, see [Creating a branch protection rule](https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/managing-protected-branches/managing-a-branch-protection-rule#creating-a-branch-protection-rule).

## Amazon Q Developer labels missing in GitHub issues
<a name="github-troubleshooting-labels"></a>

**Problem**: I don't see the **Amazon Q development agent** label in GitHub issues.

**Solution**: If the label isn't automatically created when you installed the Amazon Q Developer for GitHub app, or it was unintentionally deleted, you can manually create it in GitHub. The label must be named as **Amazon Q development agent** in order for it to be recognized and processed as a Amazon Q Developer label. For more information, see [Creating a label](https://docs.github.com/en/issues/using-labels-and-milestones-to-track-work/managing-labels#creating-a-label) in the *GitHub documentation*.

## Amazon Q Developer not creating code for GitHub issues
<a name="github-troubleshooting-generate-code"></a>

**Problem**: I created a GitHub issue and invoked Amazon Q Developer to perform a task, but I got the following series of messages regarding technical difficulties:

1. ⏳ I'm working on generating code for this issue. I'll update this issue with a comment and open a pull request when I'm done.

1. ⚠️ I'm having technical difficulties. I couldn't solve the issue. I'm going to try again. This might take some time.

1. ⚠️ I'm having technical difficulties. I couldn't solve the issue. I'm going to try again. This might take some time.

1. 🔴 I'm having technical difficulties. I couldn't solve the issue.

   Consider reassigning this issue to a user. This will help you stay within the quotas for generative AI feature usage.

**Solution**: If Amazon Q Developer is not able to process your issue and generate code for it, create a new issue and apply the **Amazon Q development agent** label to the new issue. To learn more about creating an issue and applying an Amazon Q Developer agent label, see [Developing features and iterating with Amazon Q Developer in GitHub](github-feature-development.md).