docs / configure
Configure a repository
Repository configuration lives in a single file, .conventional-comments.json, on the default branch. You only need to specify what you want to change. Anything you leave out keeps the product default.
The smallest useful configuration
{ "$schema": "https://conventionalcomments.io/schema/v1.json", "version": 1, "mode": "assist" }
The $schema entry is more than metadata. Your editor uses it to autocomplete available settings, show documentation on hover, and flag invalid values such as "enforc" before you commit them.
Three configuration levels
The repository file is only one of three configuration sources. All three are resolved together, in a fixed order.
| Level | Who controls it | What it does |
|---|---|---|
| floor | The organization, through its browsers' enterprise policy — never through a repository file. | Sets the minimum mode and defines rules that repositories cannot relax. A repository may be stricter, but never more permissive. |
| organization | A shared configuration document fetched from the URL defined by the floor. | Provides the common baseline. Changing mode here takes effect in every repository that does not set its own, including on pull requests that are already open. |
| repository | .conventional-comments.json on the default branch. | Applies local adjustments, such as exempting bots, turning off a label, or silencing a warning. |
The floor has a single channel: the browser's enterprise policy, which the extension reads on each machine. An organization that deploys no policy has no floor, and the organization document and the repository file decide on their own. When a repository file tries to go below the floor, that one setting is ignored and the extension says so. The installation page describes how the policy is deployed.
The settings worth knowing
The file has nineteen top-level settings. These are the ones that affect behaviour rather than presentation.
| Key | Default | What it controls |
|---|---|---|
| mode | assist | off · assist · enforce. In assist, the extension helps and reports, and never blocks. In enforce, it also refuses to send a non-compliant comment, in the browser where it is installed; it never blocks a merge. See the adoption guide and the Enforce page. |
| exemptUsers | empty | Users whose comments are never validated. Values are matched against platform logins case-insensitively. |
| toolCommands | empty | Defines comments intended for bots or tools. See the warning below. |
| labels | 19 labels, 18 enabled | Per-label overrides, merged by id. Only include the labels you want to change; to remove one, set its enabled to false. |
| severities | product defaults | Changes the severity of individual diagnostics: off, warn or error. Two limits apply — see below. |
| scope.validateReplies | false | Whether replies inside a thread are validated too, and not only the comments that open one. |
| configCacheTtlSeconds | 3600 | How long the extension may keep working from a configuration it has already read, in seconds. See “When a change takes effect”. |
| sessionIcon | 🤖 | The icon of the mention that replaces a session marker when a comment is displayed. See AI-assisted review. |
| coreMinVersion | 1.0.0 | Requires a minimum major version of the core. Only the major is compared: on a 1.x core, 1.99.0 is accepted and 2.0.0 triggers the fallback. It cannot require a newer minor or patch release. |
An entry in labels can change more than whether a label is enabled or blocking. Three properties are worth knowing:
kindsays what the label does with a point:"remark"raises one,"reply"answers one,"status"says where the review stands. It decides where the button sits in the toolbar and never changes a verdict. A label you create is a"remark"unless you write otherwise.descriptionis what the label means. It is shown as the tooltip of the badge on a published comment.usageis when to use the label. It is shown as the tooltip of the toolbar button, which falls back todescriptionwhenusageis absent.
Both texts are shown exactly as you write them, whatever the interface language. Setting either property to an empty string ("") removes its tooltip. Omitting it preserves the built-in label's default text. The labels page lists the nineteen labels and their kinds.
The order of the buttons is not a repository setting. Each person sets it in the extension's options, under Button order: a comma-separated list such as suggestion,nitpick,disagree. The labels listed come first within their own group — remarks, status labels or replies — and the others follow in the default order. It is a personal preference, synced by your browser; it changes no verdict and applies to the next comment box that opens.
severities has two limits that no level of configuration can lift. A diagnostic whose code starts with E- can be lowered to a warning, never turned off. And W-SESSION-MULTIPLE, the warning for a comment that carries two session markers, can never be raised to an error: a mistake in a marker must not block a comment.
toolCommands is empty by default.
In enforce mode, a bare /rebase is treated like any other non-conforming comment until the repository adds "/*", which exempts every slash command. There is no way to exempt one command on its own: an entry such as "/rebase" is ignored, and reported by a configuration notice. Bot accounts are declared individually and must match exactly, for example "@dependabot".
When a change takes effect
There is no pinned configuration: a change applies to pull requests that are already open as soon as the extension reads it. The extension keeps what it has read for configCacheTtlSeconds — one hour by default — so the status pill and the diagnostics can lag behind a change by up to that long.
Blocking is the exception. Before it refuses to send a comment, the extension reads the repository file and the organization document again, ignoring its cache. A comment is therefore never blocked on the strength of an outdated configuration: if you have just relaxed the mode or added a label, the next attempt to send goes through.
The floor can set configCacheTtlSeconds too. There it is a maximum: a repository may ask for a shorter cache than the organization's, never a longer one.
When the configuration has a problem
The extension does not stay silent about a configuration it could not apply as written. It lists configuration notices in the status pill under the comment box and on its settings page, in the language of the interface. Each notice names the level it comes from: the organization's policy, the organization document, or the repository file. Notices inform; they never change whether a comment is accepted.
| Notice | What happened | What the extension does |
|---|---|---|
| config-warning | A key is unknown or retired, a value is obsolete, or one entry of a list could not be used. | Ignores that key or entry and applies everything else. |
| floor-override | A setting tried to go below the floor. | Ignores that setting and keeps the floor's value. |
| invalid-config | The file is not valid JSON, or a known key holds an impossible value such as "mode": "banana". | Sets the whole document aside, falls back to the last valid level — the organization, then the product defaults — and points to the faulty line. |
| unsupported-version | The file declares a version above the schema version the extension supports (1 today), or a coreMinVersion whose major is above the core's major. | Falls back to assist, or to the floor if it is stricter. |
- A broken file never switches the convention off. The extension falls back to a level it can read, within the floor, and tells you why.
- A
configUrldeclared in the repository file is ignored, and reported as aconfig-warning. The organization configuration URL comes exclusively from the floor. Allowing a repository to redirect it would effectively allow that repository to choose its own organization-wide rules. - A configuration the extension could not read at all is a different case. When the request fails, the status pill says “Configuration unread”, and the extension assists without blocking: it does not refuse a comment in the name of rules it could not read. This is always the case on GitLab, where the extension cannot read a repository's configuration yet.
Five keys are retired, and so is the warn mode.
formatSeverity, resolverOverrideGroup, overrideLabel, activation and docUrl only served a merge check that the toolkit no longer plans. The server and exemptionLog blocks belonged to the companion server, retired earlier. A file that still carries any of them stays readable: each one is reported as an unknown key and ignored, and nothing else changes. "mode": "warn" is read as "assist", with a notice saying the value is obsolete. Remove the keys, write "assist", and the notices go away.