Additional Configurations
Show possible configurations¶
The possible configurations of PR-Agent are stored in here. In the tools page you can find explanations on how to use these configurations for each tool.
To print all the available configurations as a comment on your PR, you can use the following command:
To view the actual configurations used for a specific tool, after all the user settings are applied, you can add for each tool a --config.output_relevant_configurations=true suffix.
For example:
Will output an additional field showing the actual configurations used for the improve tool.
Ignoring files from analysis¶
In some cases, you may want to exclude specific files or directories from the analysis performed by PR-Agent. This can be useful, for example, when you have files that are generated automatically or files that shouldn't be reviewed, like vendor code.
You can ignore files or folders using the following methods:
IGNORE.GLOBIGNORE.REGEX
which you can edit to ignore files or folders based on glob or regex patterns.
Example usage¶
Let's look at an example where we want to ignore all files with .py extension from the analysis.
To ignore Python files in a PR with online usage, comment on a PR:
/review --ignore.glob="['*.py']"
To ignore Python files in all PRs using glob pattern, set in a configuration file:
And to ignore Python files in all PRs using regex pattern, set in a configuration file:
Extra instructions¶
All PR-Agent tools have a parameter called extra_instructions, that enables to add free-text extra instructions. Example usage:
/update_changelog --pr_update_changelog.extra_instructions="Make sure to update also the version ..."
Language Settings¶
The default response language for PR-Agent is U.S. English. However, some development teams may prefer to display information in a different language. For example, your team's workflow might improve if PR descriptions and code suggestions are set to your country's native language.
To configure this, set the response_language parameter in the configuration file. This will prompt the model to respond in the specified language. Use a standard locale code based on ISO 3166 (country codes) and ISO 639 (language codes) to define a language-country pair. See this comprehensive list of locale codes.
Example:
This will set the response language globally for all the commands to Italian.
Important: Note that only dynamic text generated by the AI model is translated to the configured language. Static text such as labels and table headers that are not part of the AI models response will remain in US English. In addition, the model you are using must have good support for the specified language.
Expand GitLab submodule diffs¶
By default, GitLab merge requests show submodule updates as Subproject commit lines. To include the actual file-level changes from those submodules in PR-Agent analysis, enable:
When enabled, PR-Agent will fetch and attach diffs from the submodule repositories. The default is false to avoid extra GitLab API calls.
Log Level¶
PR-Agent allows you to control the verbosity of logging by using the log_level configuration parameter. This is particularly useful for troubleshooting and debugging issues with your PR workflows.
The default log level is "DEBUG", which provides detailed output of all operations. If you prefer less verbose logs, you can set higher log levels like "INFO" or "WARNING".
Integrating with Logging Observability Platforms¶
Various logging observability tools can be used out-of-the box when using the default LiteLLM AI Handler. Simply configure the LiteLLM callback settings in configuration.toml and set environment variables according to the LiteLLM documentation.
For example, to use LangSmith you can add the following to your configuration.toml file:
[litellm]
enable_callbacks = true
success_callback = ["langsmith"]
failure_callback = ["langsmith"]
service_callback = []
Then set the following environment variables:
Bringing per-repo context files to PR-Agent¶
Platforms supported: GitHub, GitLab, Gitea, Bitbucket, Azure DevOps
To give PR-Agent's tools additional project context, you can have it include repository instruction files — such as AGENTS.md or CLAUDE.md — in the prompts for the /review, /describe and /improve tools.
By default, PR-Agent looks for an AGENTS.md file at the repository root:
You can list any repository-relative paths. By default the files are read from the repository's default branch, so only trusted, already-merged content is used and a PR cannot influence the guidance used to review it. A file that is missing is silently skipped. Set the option to an empty list to disable the feature entirely:
Which branch the files are read from
By default (repo_context_from_default_branch = true), instruction files are read from the repository's default branch — a single trusted source — so neither the PR nor its target branch can alter the guidance used to review it. This matches how Qodo Merge reads these files.
Set repo_context_from_default_branch = false to instead read from the PR's target (base) branch. This respects branch-specific instructions (for example a release branch, or a stacked PR that carries its own AGENTS.md), at the cost of trusting whoever can write to that target branch. Even then, files are never read from the PR's own head.
To bound how much of this context is sent to the model, repo_context_max_lines (default 500) caps the total number of rendered lines, including the wrapper tags. Content beyond the budget is truncated safely:
Ignoring automatic commands in PRs¶
PR-Agent allows you to automatically ignore certain PRs based on various criteria:
- PRs with specific titles (using regex matching)
- PRs between specific branches (using regex matching)
- PRs from specific repositories (using regex matching)
- PRs not from specific folders
- PRs containing specific labels
- PRs opened by specific users
Ignoring PRs with specific titles¶
To ignore PRs with a specific title such as "[Bump]: ...", you can add the following to your configuration.toml file:
Where the ignore_pr_title is a list of regex patterns to match the PR title you want to ignore. Default is ignore_pr_title = ["^\\[Auto\\]", "^Auto"].
Ignoring PRs between specific branches¶
To ignore PRs from specific source or target branches, you can add the following to your configuration.toml file:
[config]
ignore_pr_source_branches = ['develop', 'main', 'master', 'stage']
ignore_pr_target_branches = ["qa"]
Where the ignore_pr_source_branches and ignore_pr_target_branches are lists of regex patterns to match the source and target branches you want to ignore.
They are not mutually exclusive, you can use them together or separately.
Ignoring PRs from specific repositories¶
To ignore PRs from specific repositories, you can add the following to your configuration.toml file:
Where the ignore_repositories is a list of regex patterns to match the repositories you want to ignore. This is useful when you have multiple repositories and want to exclude certain ones from analysis.
Ignoring PRs not from specific folders¶
To allow only specific folders (often needed in large monorepos), set:
For the configuration above, automatic feedback will only be triggered when the PR changes include files where 'folder1' or 'folder2' is in the file path
Ignoring PRs containing specific labels¶
To ignore PRs containing specific labels, you can add the following to your configuration.toml file:
Where the ignore_pr_labels is a list of labels that when present in the PR, the PR will be ignored.
Ignoring PRs from specific users¶
PR-Agent tries to automatically identify and ignore pull requests created by bots using:
- GitHub's native bot detection system
- Name-based pattern matching
While this detection is robust, it may not catch all cases, particularly when:
- Bots are registered as regular user accounts
- Bot names don't match common patterns
To supplement the automatic bot detection, you can manually specify users to ignore. Add the following to your configuration.toml file to ignore PRs from specific users:
Where the ignore_pr_authors is a regex list of usernames that you want to ignore.
Note
There is one specific case where bots will receive an automatic response - when they generated a PR with a failed test.
Ignoring Generated Files by Language/Framework¶
To automatically exclude files generated by specific languages or frameworks, you can add the following to your configuration.toml file:
You can view the list of auto-generated file patterns in generated_code_ignore.toml.
Files matching these glob patterns will be automatically excluded from PR Agent analysis.
Ignoring Tickets with Specific Labels¶
When PR-Agent analyzes tickets (JIRA, GitHub Issues, GitLab Issues, etc.) referenced in your PR, you may want to exclude tickets that have certain labels from the analysis. This is useful for filtering out tickets marked as "ignore-compliance", "skip-review", or other labels that indicate the ticket should not be considered during PR review.
To ignore tickets with specific labels, add the following to your configuration.toml file:
Where ignore_ticket_labels is a list of label names that should be ignored during ticket analysis.
Restricted Mode¶
When running PR-Agent with limited GitHub/GitLab permissions, set restricted_mode to true to gracefully skip operations that require elevated access (e.g., pushing changelog changes):
With restricted mode, the minimum workflow permissions are:
Within an explicit permissions: block, any scope you do not list (such as contents) is set to none, so you do not need to grant contents — restricted mode skips every operation that would require contents: write. All tools (/review, /describe, /improve, etc.) continue to work normally with just pull-requests: write.
Note: this only holds when a
permissions:block is present (as above). If you omit thepermissions:block entirely, the effective defaults are governed by your repository/organization GitHub Actions settings and may grant broader access.

