README: update for ai-review improvements

Signed-off-by: Adam Williamson <awilliam@redhat.com>
This commit is contained in:
Adam Williamson 2026-04-21 12:18:22 -07:00
commit 332f6941f9

View file

@ -20,9 +20,19 @@ jobs:
with:
pr: ${{ forgejo.event.pull_request.number }}
secrets:
GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }}
AICR_API_KEY: ${{ secrets.AICR_API_KEY }}
```
You must define the `GEMINI_API_KEY` as a secret in your repository; it must be a valid Gemini API key. You can use other contexts, if you like, but if so, you may need to change how the pull request number is discovered and passed through, and you may want to put `remove_label: false` in the `with` block to disable the attempt to remove the `ai-review-please` label after the review is done. If used as above, the workflow will post a review any time a label named `ai-review-please` is applied to a pull request.
You must define the `AICR_API_KEY` as a secret in your repository; it must be a valid API key for the configured model provider. The default model provider is Gemini. You may include a `config` input, like this:
```
...
with:
pr: ${{ forgejo.event.pull_request.number }}
config: 'include_mr_summary: false\nai_model: gemini-3.1-flash-lite-preview'
...
```
The string is written out as `.ai_review/config.yml`, so it can contain any config directive ai-code-review supports. The string is written with printf, so newline characters are written out as newlines in the file. You can use this to change the AI provider away from Gemini if desired.
You can use other contexts, if you like, but if so, you may need to change how the pull request number is discovered and passed through, and you may want to put `remove_label: false` in the `with` block to disable the attempt to remove the `ai-review-please` label after the review is done. If used as above, the workflow will post a review any time a label named `ai-review-please` is applied to a pull request.
## Licensing