diff --git a/docs/ai/ai-code-review.rst b/docs/ai/ai-code-review.rst new file mode 100644 index 00000000..0100a056 --- /dev/null +++ b/docs/ai/ai-code-review.rst @@ -0,0 +1,29 @@ +.. _ai-code-review: + +AI Code review +================= + +To start AI code review, first complete the setup in :ref:`ai-config`. + +You can configure AI code review in several places: + +1. Global (admin) + Navigate to :menuselection:`Admin --> Authentication --> Settings --> AI Features` and enable `Turn on AI code review by default for new PRs`. + This sets the default for all newly created pull requests. Repository admins and PR authors can override this setting at the repository and pull request level. + +2. Repository-level setting (repository admin) + Navigate to :menuselection:`Repository Settings --> VCS --> Pull Request Settings` and toggle `Enable AI review for pull requests`. + +3. During pull request creation (any user) + When creating a pull request, enable the `Run AI code review` checkbox to run the review for that PR. + +4. In an existing pull request (any user) + In an existing pull request, use the button in the right-side menu to start an AI code review. + + +.. note:: + + At the moment, AI code review can only be run once per pull request. + After the review finishes, you won’t be able to restart it. In addition, + you can view the AI code review status in the audit logs. + diff --git a/docs/ai/ai-configuration.rst b/docs/ai/ai-configuration.rst new file mode 100644 index 00000000..efa6e9e7 --- /dev/null +++ b/docs/ai/ai-configuration.rst @@ -0,0 +1,16 @@ +.. _ai-config: + +AI Configuration +================= + +To start using AI features in the |RCE|, run through the below steps: + +1. Navigate to :menuselection:`Admin --> Authentication --> Settings --> AI Features` - and check `Enable AI features` checkbox. + +2. Insert your API key into the `Api key` input. + +3. Select `AI Model` from the dropdown. Currently |RCE| supports 3 providers: GPT, Gemini, Claude. + +4. Hit `Update model versions` button. This will download model versions for selected model. + +5. Hit `Save` button. diff --git a/docs/index.rst b/docs/index.rst index da3a5b33..2863efb6 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -47,6 +47,13 @@ and commit files and |repos| while managing their security permissions. RhodeCode RCstack Installer +.. toctree:: + :maxdepth: 1 + :caption: AI Documentation + + ai/ai-configuration + ai/ai-code-review + .. toctree:: :maxdepth: 1 :caption: Admin Documentation