Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 10 Next »

The AI Review Assistant lets you communicate with ChatGPT from within the comfort of your pull requests, with the context of your pull requests!

To be as helpful as possible, the AI Review Assistant will send information related to your pull request to the ChatGPT API.
The following information is sent:

  • Title and description of the pull request,

  • Commit titles of the pull request,

  • Diff of the pull request, and

  • Content of Jira issues linked (via commit messages) to the pull request.

Consult our privacy policy for more information.

Set up

The first thing you need to do is to enable AI Review Assistant. To do that, you need to head over the Global Admin page of Code Review Assistant, and enable the toggle in front of “AI Review Assistant enabled”.

After doing that, you need to configure it on each repository for which you want to use it.

As a repository administrator, follow the following steps:

  1. Get your API Key from OpenAI by going here.

  2. Go to the Code Review Assitant settings page of your repository

  3. At the top of the page, select a model supported by your API Key, and copy-paste your key in the input field

  4. Click on “Save”. You should see a confirmation flag that your data as been updated.

Usage

You can interact with the AI Review Assistant directly in your pull request. To do so, write a comment starting by /aira followed by your question for ChatGPT. ChatGPT will receive the information related to your pull request (current title, description, commit titles and the diff), followed by your question.

Once ChatGPT has answered, AI Review Assistant will post a reply to your comment.

Some examples to get you started:

  • /aira What is the purpose of this change?

  • /aira Are there any password or PII information that leaked in this pull request ?

  • /aira Can you write a description for this pull request?

You can then reply to AI Review Assistant’s comment, and it will again reply back, with the knowledge of the comment thread.

AI Review Assistant will respond in the same way if you write a comment directly in a file affected by the pull request. For example, you can ask

  • /aira Can you explain the algorithm of this function?

FAQ

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

Global Bitbucket Admins can disable AI Review Assistant through the Code Review Assistant admin page. At the top of the page, you can disable the toggle. Then, even if a repository has configured AI Review Assistant, it will not respond (and data will not be shared).

Note that AI Review Assistant is disabled by default, and none of the repositories are configured.

How can I disable AI Review Assistant for a repository?

There is no toggle to disable AI Review Assistant for a repository. However, if you do not configure the assistant (by not filling the token information), then it will be effectively disabled, and no data will be shared to the ChatGPT API.

If you previously configured AI Review Assistant, you can remove the token by saving the configuration with an empty token.

Who can use AI Review Assistant on a pull request?

Anyone who is allowed to write a comment on a pull request will be allowed to interact with the AI Review Assistant.

I wrote a comment starting by /aira, but nothing happened

First, try to refresh the page. AI Review Assistant responds to Pull Request comments, and those are not refreshed automatically. If the response is still not there, please check the following things.

Sometimes the AI Review Assistant can take a bit of time to answer (up to 2 minutes). Past that time, you should see a message saying that it took too much time.

AI Review Assistant will also respond in case there is another issue with your request (for example, API Key is not properly configured). If, however, nothing happens after 2 minutes, this indicates that there is an unknown issue, and you should contact an Administrator.

  • No labels