You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| ai_retries | Main (review + guide) | 🟢 Optional | Number of retries for AI agent queries. Default: 1. |
386
398
| ai_input_tokens_limit| Main (review + guide) | 🟢 Optional | Max input tokens for LLM. Default: 500,000. Use `"no-limit"` to disable. |
387
-
| git_api_key | Main (review + guide) | 🔴 Required* | API key for git service (GitHub/GitLab). Can't be given through config file. Also available through env variable `LGTM_GIT_API_KEY`. |
399
+
| git_api_key | Main (review + guide) | 🟡 Conditionally required | API key for git service (GitHub/GitLab). Can't be given through config file. Also available through env variable `LGTM_GIT_API_KEY`. Required if reviewing a PR URL from a remote repository service (GitHub, GitLab, etc.). |
388
400
| ai_api_key | Main (review + guide) | 🔴 Required* | API key for AI model. Can't be given through config file. Also available through env variable `LGTM_AI_API_KEY`. |
389
401
| technologies | Review Only | 🟢 Optional | List of technologies for reviewer expertise. |
390
402
| categories | Review Only | 🟢 Optional | Review categories. Defaults to all (`Quality`, `Correctness`, `Testing`, `Security`). |
391
403
| additional_context | Review Only | 🟢 Optional | Extra context for the LLM (array of prompts/paths/URLs). Can't be given through the CLI |
404
+
| compare | Review Only | 🟢 Optional | If reviewing local changes, what to compare against (branch, commit, range, etc.). CLI only. |
| issues_platform | Issues Integration | 🟡 Conditionally required | Required if `issues_url` is set. |
394
407
| issues_regex | Issues Integration | 🟢 Optional | Regex for issue ID extraction. Defaults to conventional commit compatible regex. |
@@ -409,7 +422,7 @@ These options apply to both reviews and guides generated by lgtm.
409
422
- **silent**: Do not print the review in the terminal. Default is `false`.
410
423
- **ai_retries**: How many times to retry calls to the LLM when they do not succeed. By default, this is set to 1 (no retries at all).
411
424
- **ai_input_tokens_limit**: Set a limit on the input tokens sent to the LLM in total. Default is 500,000. To disable the limit, you can pass the string `"no-limit"`.
412
-
- **git_api_key**: API key to post the review in the source system of the PR. Can be given as a CLI argument, or as an environment variable (`LGTM_GIT_API_KEY`).
425
+
- **git_api_key**: API key to post the review in the source system of the PR. Can be given as a CLI argument, or as an environment variable (`LGTM_GIT_API_KEY`). You can omit this option if reviewing local changes.
413
426
- **ai_api_key**: API key to call the selected AI model. Can be given as a CLI argument, or as an environment variable (`LGTM_AI_API_KEY`).
414
427
415
428
#### Review options
@@ -419,6 +432,7 @@ These options are only used when performing reviews through the command `lgtm re
419
432
- **technologies**: Specify, as a list of free strings, which technologies lgtm specializes in. This can help direct the reviewer towards specific technologies. By default, lgtm won't assume any technology and will just review the PR considering itself an "expert" in it.
420
433
- **categories**: lgtm will, by default, evaluate several areas of the given PR (`Quality`, `Correctness`, `Testing`, and `Security`). You can choose any subset of these (e.g., if you are only interested in `Correctness`, you can configure `categories` so that lgtm does not evaluate the other missing areas).
421
434
- **additional_context**: TOML array of extra context to send to the LLM. It supports setting the context directly in the `context` field, passing a relative file path so that lgtm downloads it from the repository, or passing any URL from which to download the context. Each element of the array must contain `prompt`, and either `context` (directly injecting context) or `file_url` (for directing lgtm to download it from there).
435
+
- **compare**: When reviewing local changes (the positional argument to `lgtm` is a valid `git` path), you can choose what to compare against to generate a git diff. You can pass branch names, commits, etc. Default is `HEAD`. Only available as a CLI option.
0 commit comments