GitLab Duo concepts - Amazon Q Developer

GitLab Duo concepts

Note

GitLab Duo with Amazon Q is in preview release and is subject to change.

Here are some concepts and terms to know when using GitLab Duo with Amazon Q.

GitLab Duo with Amazon Q preview is available in the gitlab-duo-with-amazon-q-preview branch of the public GitLab repository. To learn more about GitLab's canonical source and collaborating on code, see the GitLab README.

Configuring GitLab Duo with Amazon Q

Before you can use Amazon Q artificial intelligence (AI) capabilities in GitLab, you must first do the following:

To learn how to create the required resources and set up GitLab Duo with Amazon Q, see Getting started with GitLab Duo with Amazon Q.

GitLab quick actions

When invoked, quick actions perform tasks for you in GitLab issues and merge requests. To learn how to invoke quick actions in GitLab, see the GitLab documentation.

Merge request generation and iteration

  • /q dev – Allows you to go from a high-level idea captured in a GitLab issue to having Amazon Q generate a ready-to-review merge request with the proposed code implementation. This helps streamline the process of turning concepts into working code. The merge request is created in a new branch and Amazon Q assigns the issue creator as a merge request reviewer.

  • /q dev (revise) – Allows you to iterate on the proposed code implementation provided by Amazon Q. Amazon Q reviews your feedback and makes updates to the code that was originally generated. You can then review and merge the suggestions to your code.

Code transformation

  • /q transform – Allows you to initiate the upgrade process from Java Maven 8 or Java Maven 11 to Java Maven 17 project. Starting from a GitLab issue, Amazon Q analyzes the code to determine the necessary Java upgrades or modernization, updates the issue, automatically opens a new merge request with the proposed changes, and assigns the issue creator as a reviewer. You need a GitLab Runner setup to build, and it needs to be customized for code transformation. For more information, Customizing a CI/CD pipeline for code transformation.

Unit test generation

  • /q test – Allows you to generate new unit tests in merge requests, including for findings during reviews performed by Amazon Q, surface missing unit test coverage for selected code. Amazon Q comments with unit test suggestions that can be added to your test file.

Code review

  • /q review – Allows you to initiate a merge request review in GitLab Duo with Amazon Q. Amazon Q iterates on in-line feedback you provide and gives you code analysis with comments, with each comment providing a separate finding.

  • /q fix – Allows you to remediate problems or deficiencies that Amazon Q detects during the merge request review process. Amazon Q addresses the code quality findings that are commented in-line as it automatically suggests code to remediate the problems or deficiencies.