Files
renovate/docs/usage
Pierluigi Lenoci 09def4f3a7 feat(config): add statusCheckWhen option to control individual Renovate status checks (#42887)
* feat: add generic statusCheckWhen option to control any renovate status check

Replace the artifacts-specific `artifactsCheckWhen` option with a generic
`statusCheckWhen` object that can control when ANY Renovate status check is
emitted. Keys mirror `statusCheckNames`: `artifactError`, `configValidation`,
`mergeConfidence`, `minimumReleaseAge`.

Each key accepts: "always" | "never" | "failed"
- always: set check on every commit (green on success, red on failure)
- never: skip the check entirely
- failed: only set the check when there is a failure (silent on success)

Default values preserve existing behavior:
- artifactError: "failed" (only report failures, as before)
- configValidation: "always"
- mergeConfidence: "always"
- minimumReleaseAge: "always"

The defaults table in docs is autogenerated from the option's `default`
field via `tools/docs` so the docs cannot drift from the source of truth.

Logging is gated so that "skipping" debug lines only fire when there is
something to skip (errors / status set), keeping logs quiet on every
branch run when a check is set to "never".

Example configuration:
```json
{
  "statusCheckWhen": {
    "artifactError": "always",
    "mergeConfidence": "never"
  }
}
```

Signed-off-by: Pierluigi Lenoci <pierluigilenoci@gmail.com>

* refactor(docs): address viceice review — single replace marker, coerceObject, simplify replaceContent call

- Use single replace marker instead of begin/end pair in docs and config.ts
- Use coerceObject from lib/util/object.ts instead of manual (val ?? {}) as Type
- Refactor replaceContent call to match upstream API signature (string, not object)

Signed-off-by: Pierluigi Lenoci <pierluigilenoci@gmail.com>

* fix: fix test for never mode with no errors and format docs

- Add missing config.artifactErrors = [] in test that checks
  'skips status entirely when mode is never with no errors' (beforeEach
  sets artifactErrors to [{fileName: 'some'}], test needs no errors)
- Reformat note block in docs from 4-space to 2-space indent to match
  prettier formatting (custom mkdocs-admonitions plugin expectation)

Signed-off-by: Pierluigi Lenoci <pierluigilenoci@gmail.com>

---------

Signed-off-by: Pierluigi Lenoci <pierluigilenoci@gmail.com>
2026-06-10 14:22:43 +00:00
..
2023-08-22 14:07:21 +02:00