Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Upon creation of a pull request to the main branch, these comments will be created, and AI Review Assistant will respond like in the image below.

...

Example prompts

As any tool based on ChatGPT (or similar technologies), you can ask about anything to it and it will respond. However, it takes a bit of practice to know how to ask questions the right way. These questions are called prompts in the context of AI. Below, we walk you through some examples that have brought some success in our internal usage.

1. Ask about facts

AI Review Assistant will be good at scanning your pull requests for particular facts that a human can easily double-check. The following questions can be applied automatically to any pull request.

  1. /aira Make a list of all files and line numbers where there is a password in plain-text in this Pull Request

  2. /aira Make a list of all files and line numbers where PII information might leak from the code in this Pull Request

  3. /aira Make a list of any inconsistencies between inline comments in the codes, and the implementation, or the description of this Pull Request?

2. Ask about help understanding the pull request

AI Review Assistant can also help the reviewers to understand a particular piece of code that was changed. The following questions can be applied by a human directly on the source code file

  1. /aira Please write the steps of the algorithm implementing this function <name of the function>

  2. /aira Please list the places where this new class <name of the class> is used in this pull request

3. Ask about generating new content

AI Review Assistant can also generate code related to the pull request, which can then be added to it.

  1. /aira Please write another test case that is relevant to the implementation of this function <name of the function>

  2. /aira Please write a docstring (Java style) explaining the purpose of this function <name of the function>

FAQ

How can I disable AI Review Assistant for my Bitbucket Instance?

...