Commit Graph

3688 Commits

Author SHA1 Message Date
Sergei Zharinov 19a38430eb fix(post-upgrade): preserve executable file modes (#44505)
* fix(post-upgrade): preserve executable file modes

* refactor(post-upgrade): clarify executable detection

* refactor(post-upgrade): use filesystem abstraction

* Clarify Git executable bit detection

* test(post-upgrade): use CI platform for mode coverage

* fix(post-upgrade): trust Git file mode setting

* perf(git): cache file mode setting

* test(post-upgrade): cover existing executable artifact

* test(post-upgrade): verify committed executable mode

* test(git): skip chmod regression without file mode support
2026-07-17 12:03:51 +00:00
Sebastian Poxhofer 4add67e86e test: add linter for as any in test files (#44658)
* ci(linter): add prefer-partial-in-specs oxlint rule

Flags object literals cast to `any` (`{...} as any`) in spec/test files and steers toward `partial<T>()` from `test/util`. Enabled at error in the spec-files override so CI blocks new occurrences.

Closes #44646

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* test: drop unnecessary object-literal `as any` casts

The casts masked values already assignable to the expected type (migration configs accepted as Record<string, unknown>, all-optional param types, etc.); removing them restores real type checking.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* test: replace object-literal `as any` casts with partial<T>()

Uses partial<T>() from test/util so incomplete mock/config objects keep proper typing. Azure API mocks switch to mockResolvedValue(partial<T>()) and their inner method mocks to mockResolvedValue(), matching the sibling-file idiom.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* test: suppress prefer-partial-in-specs for intentionally-invalid inputs

Some tests deliberately pass malformed or legacy data to exercise validation/error paths, where no real type fits; keep the cast with a reasoned oxlint-disable-next-line.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-17 10:47:30 +00:00
Sebastian Poxhofer c41b46bac3 feat(logging): do not use dynamic fields in log messages with severity WARN or higher (#44560)
* ci(linter): add renovate/logger-static-message rule

Adds a custom oxlint rule that enforces a static msg component for
logger.warn/error/fatal calls (including logger.once variants) so the
messages can be grouped in metrics and error catching services, per
docs/development/best-practices.md. It also flags metadata properties
named 'error' that hold error-ish values, because the bunyan serializer
only handles the 'err' key.

The rule is enabled as an error for lib/ production code and disabled
for spec files. All 33 pre-existing violations are fixed by moving
interpolated values into the metadata object, making messages static,
and renaming 'error' metadata keys to 'err'. Affected log-message
assertions in co-located specs are updated accordingly.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* ci: ignore validator output

* fixup new merged in log messages

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-16 06:53:37 +00:00
Felipe Santos 42864ebb4d fix(config): move checkedBranches and rebaseAllOpenBranches into GlobalConfig (#44611)
* refactor(config): move checkedBranches and rebaseAllOpenBranches into GlobalConfig

Both options are globalOnly but were being read directly off the
repository config object instead of GlobalConfig, so they weren't
part of the RepoGlobalConfig contract enforced elsewhere.

* test: reset GlobalConfig in beforeEach instead of per-test

Matches the pattern used elsewhere (common.spec.ts, error-config.spec.ts,
prune.spec.ts) and resets before each test instead of after, so a failed
assertion can't leak state into the next test.

* refactor: use isNonEmptyArray instead of .length check
2026-07-15 15:41:03 +00:00
Felipe Santos cb0ee72c79 fix: rebase request not bypassing commit limits (#43031)
* fix: rebase request not bypassing commit limits

* Address review comment
2026-07-15 15:16:04 +00:00
Felipe Santos 13b5ae4307 feat: add --rebase-all-open-branches (#44607)
* feat: add `--rebase-all-open-branches`

* feat: mark rebaseAllOpenBranches as cli: true explicitly

* feat: mark checkedBranches as cli: true explicitly
2026-07-15 14:44:11 +00:00
Michael Kriese 4ca050eacf fix(worker/repository): only set artifacts status when branch was updated (#44597)
* fix(worker/repository): only set artifacts status when branch was updated

* test: fix test
2026-07-15 09:44:37 +00:00
Jamie Tanna df7aa7b687 chore(workers/repository): instrument calculation of limits (#44581)
As part of an investigation around `commitHourlyLimit` performing slowly
on a repository with many branches, we can introduce more
instrumentation to be able to debug further.
2026-07-14 16:09:22 +00:00
Felipe Santos 5aa3c7e00e fix: misleading PR body changed log when autoApprove is enabled (#43913)
* fix: misleading log message when updatePr is called due to autoApprove

* Log "PR body changed" only if PR body changed

* Revert "Log "PR body changed" only if PR body changed"

This reverts commit b4bd3de3d2.

* Add log assertion ot test
2026-07-14 14:03:27 +00:00
Jamie Tanna 121f5df81d chore: log how many branches commitHourlyLimit is being calculated against (#44575)
As it can be useful to know on large repositories.
2026-07-14 13:55:42 +00:00
Sebastian Poxhofer 00043d193e test(linters): add codeblock linter rule for spec fixtures (#44551)
* ci(linter): add renovate/codeblock-in-spec-fixtures rule

Add a custom oxlint rule that requires the codeBlock (or stripIndent)
template helper from common-tags for multi-line string fixtures in spec
files (enabled for **/*.spec.ts and test/** only).

The rule only flags shapes whose value can round-trip through the
common-tags helpers unchanged, since both codeBlock and stripIndent trim
the end result and strip the shortest line indentation:

- only literals spanning multiple source lines are flagged (escaped \n
  one-liners are left alone: tagging them is not value-preserving in
  general and gains nothing)
- values with leading/trailing whitespace (e.g. fixtures ending in a
  newline) are not flagged
- tagged templates, describe/it titles, and inline snapshot arguments
  are skipped

All 55 pre-existing violations (22 files) were fixed with a one-off
codemod that re-emits each fixture indented to the statement depth and
verifies value preservation by evaluating codeBlock on the rewritten
template (substitutions kept as opaque placeholders). One site
(pip_requirements/artifacts.spec.ts) mixes line continuations with
escaped newlines and was tagged verbatim instead of re-indented.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* ci(linter): address review findings

Make getSimpleRequirementsFile in pip-compile/extract.spec.ts
value-preserving again: tagging the whole template with codeBlock
trimmed the trailing blank line when deps is empty (the headerOnly.txt
case), silently changing the fixture from ending in '#\n\n' to '#'.
Tag only the static header and append the deps section via a
single-line template, which reproduces the original string exactly
for both empty and non-empty deps (verified by executing old vs new
in node).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-14 13:00:02 +00:00
Sebastian Poxhofer 64e6a4c71f refactor(oxlint): enable unicorn/prefer-at (#44556)
Enable the unicorn/prefer-at rule as error in .oxlintrc.json and fix all
43 pre-existing violations (arr[arr.length - 1] -> arr.at(-1)) via oxlint
autofix. Where .at() widened the type to T | undefined, non-null
assertions were added at sites where surrounding logic guarantees the
element exists (length guards, split results), preserving the original
runtime behavior and typing.

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-14 12:57:23 +00:00
Sebastian Poxhofer d57843c60d refactor(oxlint): enable typescript/no-unnecessary-type-arguments (#44555)
Enable the type-aware typescript/no-unnecessary-type-arguments rule as
error and remove all 44 pre-existing redundant type arguments (type
arguments identical to the type parameter default), e.g.
HttpResponse<string>, ZodError<unknown>,
PackageDependency<Record<string, any>>.

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-14 12:33:42 +00:00
Sebastian Poxhofer e9c9c92e10 test(oxlint): enable vitest/consistent-test-it (#44554)
refactor(oxlint): enable vitest/consistent-test-it

Enforce `it` over `test` in spec files via
vitest/consistent-test-it (fn: "it"), matching repo convention.
Renamed all 52 pre-existing `test(`/`test.each` usages across
13 spec files to `it(`/`it.each` using oxlint --fix.

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-14 12:28:52 +00:00
Sebastian Poxhofer 9717259ffc refactor(oxlint): enable no-else-return and unicorn/no-lonely-if (#44553)
Enable no-else-return (with allowElseIf: false) and unicorn/no-lonely-if
as errors in .oxlintrc.json and fix all 131 pre-existing violations
(91 no-else-return, 40 unicorn/no-lonely-if) across 98 files.

The no-else-return violations were fixed with the oxlint autofix
(iterated to a fixpoint, plus two else-if chains that required
--fix-dangerously) followed by Prettier formatting. One comment dropped
by the autofix in lib/modules/manager/pub/artifacts.ts was restored
manually. The unicorn/no-lonely-if violations were merged by hand,
preserving comments and coverage-ignore hints.

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-14 12:11:21 +00:00
Sebastian Poxhofer 7436b80cda test(linter): add renovate/no-redundant-mock-reset rule (#44557)
ci(linter): add renovate/no-redundant-mock-reset rule

Vitest sets mockReset: true globally in vitest.config.mts, which resets
all mocks before each test. This makes vi.resetAllMocks() /
vi.clearAllMocks() and per-mock .mockReset() / .mockClear() calls inside
beforeEach/afterEach hooks redundant. Add a custom oxlint rule (enabled
for **/*.spec.ts and test/**) flagging such calls, and remove the 40
redundant calls it found. restoreAllMocks/mockRestore are not flagged
because restoreMocks is not enabled globally.

Two sites keep an inline disable with a reason: nested beforeEach hooks
in filter-checks.spec.ts and onboarding/pr/index.spec.ts intentionally
call mockReset() to discard once-values queued by an outer beforeEach.

Requested by maintainer review feedback (review comment 3052324877).

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-14 11:26:20 +00:00
Sebastian Poxhofer a31f9cf0f9 refactor(schemas): prefer Nullish schema utils instead of z.nullish() (#44565)
* ci(linter): add renovate/prefer-zod-nullish rule

Add a custom oxlint rule that flags zod chains calling .optional() and
.nullable() adjacently (in either order) and suggests .nullish(), which
is equivalent (both accept undefined | null in zod v4).

Fix all 26 pre-existing violations across 6 schema files.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

* ci(linter): prefer schema-utils Nullish over zod .nullish()

Rename prefer-zod-nullish to prefer-nullish-util and extend it to flag
.nullish() itself, including the standalone forms z.nullish(x) and
z.optional(z.nullable(x)). Migrate all call sites to Nullish() and
DeepNullish() from schema-utils, which normalize null to undefined in
parsed output. Schemas with more than one nullish position are wrapped
in DeepNullish(); nullish object properties with nullish members use
Nullish(DeepNullish(...)) to keep the optional property type marker.

Spec files are exempt (result.spec.ts intentionally tests
null-preserving parses). Spec assertions expecting null in parsed
output were updated to undefined. Note: docker manifests with an
explicit "mediaType": null are now accepted and treated like an absent
mediaType instead of failing the discriminated union.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-14 10:15:55 +00:00
Felipe Santos 3032c960b3 fix: avoid proposing replacements when the new dependency already exists (#40149)
* fix(npm): remove old dependency when replacement exists

* Add coverage ignore comments

* Simplify implementation

* Rename to removeAsString

* Move it after replaceAsString

* Improve test case

* Improve error message of replaceAsString

* Fix coverage

* Fix coverage again

* Only remove dependency at depType like replaceAsString

* Refactor tests

* Fix tsc

* fix(npm): skip update when replacement dependency already exists

* Simplify else

* Avoid returning an error

* fix(flatten): skip replacement updates when a sibling dependency already exists

* Revert the other changes

* Also handle it in the Dependency Dashboard

* Filter out earlier

* Try some other way

* Try fix dep dashboard

* Try fix again

* Extract helper

* Improve some stuff

* Improve assertion

* Remove misleading comment

* Address review comments
2026-07-13 18:13:53 +00:00
RahulGautamSingh 198a4a7bb7 fix(custom/jsonata): support autoReplaceStringTemplate (#43535)
* fix(custom/jsonata): support autoReplaceStringTemplate

* apply suggestions

* fix types
2026-07-10 06:29:59 +00:00
Sebastian Poxhofer ad0b59f8b7 refactor(oxlint): enable vitest/require-to-throw-message (#44421) 2026-07-07 17:47:04 +00:00
Sebastian Poxhofer b106668a95 refactor(oxlint): enable typescript/no-useless-default-assignment (#44419)
- Convert `param: T | undefined = undefined` to optional `param?: T`.
- Drop dead `= false` defaults on the required cache-provider options.
- Make `GraphqlPaginatedContent.nodes/edges` optional so the `= []`
  fallbacks (load-bearing for partial GraphQL connections) are valid.
- Type the unchecked `default_branch` response field as optional so
  the `'HEAD'` fallback is retained.
- Drop `tag = undefined` from the Forgejo/Gitea/GitLab preset configs.

Part of #43845

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-07 16:38:48 +00:00
Sebastian Poxhofer aac8365dd6 refactor(oxlint): enable vitest/prefer-snapshot-hint (#44420)
Add distinct hints to the multi-snapshot tests flagged by the rule
and regenerate the affected snapshot files, then re-enable the rule.

Part of #43845

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-07 16:35:22 +00:00
Jamie Tanna bcd44b991f feat(onboarding): add a summary for detected package files (#44258)
* refactor(onboarding): extract a function for calculating packageFiles

As part of a future change, we'll introduce a "summary" view for larger
repositories, and having a function extracted makes intent clearer.

Co-authored-by: Claude Sonnet 4.6 <jamie.tanna+claude-code@mend.io>

* refactor(onboarding): add a summary for detected package files

As part of future changes in #41502, we're introducing a
Platform-limit-aware onboarding/reconfigure flow that will provide a
summary where appropriate.

Before we do so, we can introduce the new functionality - but not
integrate it right now - to incrementally add support.

As a slightly better interface when we have a large list of detected
package files, we can provide a summary per Manager.

Co-authored-by: Claude Sonnet 4.6 <jamie.tanna+claude-code@mend.io>

* refactor(onboarding): group 3+ files under a directory as a list

As it's a more readable summary, especially with i.e. GitHub Actions,
where all package files commonly share the same directory.

The use of `3` as the lower bound was chosen without any research or too much
thought put into it.

Co-authored-by: Claude Sonnet 4.6 <jamie.tanna+claude-code@mend.io>

---------

Co-authored-by: Claude Sonnet 4.6 <jamie.tanna+claude-code@mend.io>
2026-06-27 15:14:00 +00:00
Felipe Santos 936decec07 fix: preserve version in PR title for Maven property updates (#44176)
* fix: `commitMessageExtra` not being honored

* Retain version for Maven property versions

* Fix PRs not being marked as immortal

* Revert "Fix PRs not being marked as immortal"

This reverts commit a17cc15342.

* Revert "Retain version for Maven property versions"

This reverts commit 3f14484f46.

* Revert "fix: `commitMessageExtra` not being honored"

This reverts commit 6c86357580.

* fix: avoid removing the version the PR title for Maven properties

* Do not consider Maven property updates as groups

---------

Co-authored-by: Jamie Tanna <jamie.tanna@mend.io>
2026-06-23 14:39:04 +00:00
Jamie Tanna 9d0ddbd2bc feat(config): set groupSingleUpdates=false by default (#44168)
* feat(config): set `groupSingleUpdates=false` by default

Although it didn't seem like this may be a breaking change when we
introduced this[0], there have been a number of follow-up Discussions
reported that have indicated there has been some breakage from the
changes.

Instead of continually fixing forward, we can revert this back to an
opt-in feature.

Once it's stable, we can look at re-enabling it (most likely in a major
release, unless we're confident no breakage should occur).

[0]: https://github.com/renovatebot/renovate/pull/43629#issuecomment-4594201274

* fixup! feat(config): set `groupSingleUpdates=false` by default
2026-06-23 09:17:57 +00:00
Alex Thomae f3492fe1c8 fix(workers/repository): use GlobalConfig for productLinks (#44126)
* fix(workers/repository): use GlobalConfig for productLinks

PR #44098 added productLinks to GlobalConfig.OPTIONS, which moves it into
GlobalConfig and deletes it from the per-repo config. Several readers
were not migrated and now receive undefined from config.productLinks.

Most visibly, setStability and setConfidence build the status check
target_url from config.productLinks?.documentation. With it now empty the
URL becomes scheme-relative (e.g. "key-concepts/minimum-release-age/"),
which GitLab rejects with HTTP 400. That throws in setBranchStatus and
aborts the branch before its merge request is created.

Migrate the remaining readers to GlobalConfig.get('productLinks'),
matching #44098, and drop the now-redundant coerceString calls and
non-null assertions.

* refactor(config): drop productLinks from RenovateSharedConfig

productLinks is globalOnly and is now read via GlobalConfig.get. Leaving
it on the per-repo RenovateSharedConfig let callers read the (always
empty) config.productLinks, which is the footgun this PR fixes. Remove it
from the shared interface so it only exists on RepoGlobalConfig, and the
type now prevents reintroducing config.productLinks.
2026-06-22 07:16:59 +00:00
Felipe Santos 523bf29be8 fix: not applying global options in object entries in repositories array (#43295)
* fix: not applying global options in object entries in `repositories` array

* Use isNonEmptyObject

* Add test for per-repo override

* Use AllConfig instead
2026-06-19 14:55:52 +00:00
Felipe Santos ae13ef034a fix: omit version from pr title if group has a single update (#43970) 2026-06-19 10:37:07 +00:00
Jamie Tanna e1e5c398e0 chore: ensure we use productLinks for docs site links where possible (#44066)
* chore: ensure we use `productLinks` for docs site links where possible

Where possible, we should be making sure that we're using the
`productLinks`' configuration for  the documentation site, especially
where self-hosted users may create a mirror of their docs[0].

To make sure we catch this in the future, we can introduce a custom
linting rule with Oxlint to enforce this.

Where we (currently) can't wire in the config, we can disable it against
that line.

[0]: https://www.jvt.me/posts/2024/11/19/renovate-private-docs/

Co-authored-by: Claude Sonnet 4.6 <jamie.tanna+claude-code@mend.io>

* fixup! chore: ensure we use `productLinks` for docs site links where possible

Co-authored-by: Claude Sonnet 4.6 <jamie.tanna+claude-code@mend.io>

* fixup! chore: ensure we use `productLinks` for docs site links where possible

Co-authored-by: Claude Sonnet 4.6 <jamie.tanna+claude-code@mend.io>

---------

Co-authored-by: Claude Sonnet 4.6 <jamie.tanna+claude-code@mend.io>
2026-06-18 08:55:27 +00:00
Sebastian Poxhofer 7573fa98f2 feat(platform/forgejo): validate http request with schemas (#43900)
* fix(platform/forgejo): replace getJsonUnchecked with validated getJson

Migrate all getJsonUnchecked calls in the Forgejo platform module to use
getJson with Zod schemas for response validation. Add comprehensive Zod
schemas to schema.ts and update test mocks to use proper data formats.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* simplify by using infered types

* first pass on reducing duplications

* move PrStatus and CommitStatus to schema

* remove code handling BranchStatus values now ensured by schema

* remove now unreachable code

* fix coverage

* use forgejo schemas instead gitea for changelog fetching

* feat: do not abort repo on unrecognized default merge style

* refactor: instead of usages of `?? {}` with a default parameter

* tighten required parameters and move contentString generation to schema

* refactor: merge both content schemas and use a discriminated union

* refactor: move patchJson and postJson to schema validation

* Make body field required

* make schema more strict

* use DeepNullish

* simplify catch

* revert the gitea Content type change

* unify User

* log more nicely if accidentally not a file has been referenced

* Use fakeSha and LongCommitSha schema

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-16 14:22:01 +00:00
Jamie Tanna ac013be4e2 fix(workers/global): parse .jsonc files (#44034)
* fix(workers/global): parse `.jsonc` files

As noted in #44033, this leads to cases where
`renovate-config-validator` can't parse a repo's `renovate.jsonc`.

This doesn't currently affect when Renovate itself runs fully.

* test(workers/global): add coverage for `getParsedContent`

This test also validates that the fix introduced in the previous commit
correctly fixes the issue.

This also makes sure that if we change the default JSON-like filenames,
we'll validate that it can be parsed, based on the filename.

Co-authored-by: Claude Sonnet 4.6 <jamie.tanna+claude-code@mend.io>

---------

Co-authored-by: Claude Sonnet 4.6 <jamie.tanna+claude-code@mend.io>
2026-06-16 13:45:14 +00:00
Tharaka De Silva 727e29ffbf feat(release-notes): include gitRef in release notes cache key (#43991)
* feat(release-notes): include gitRef in release notes cache key

Append the release gitRef to the changelog cache key so that releases
sharing a version but pointing at different git refs are cached and
matched independently.

* chore: remove global resets
2026-06-16 05:10:31 +00:00
Jamie Tanna a8abc01421 chore(workers/repository): add a summary of dependency updates (#43770)
* test(workers/repository): don't use generic `times(2)` matcher

So it's clearer what we're validating.

Co-authored-by: Claude Opus 4.7 <jamie.tanna+claude-code@mend.io>

* chore(workers/repository): add a summary of dependency updates

As part of future changes, we'll be making further tweaks to how the
onboarding PR is generated, which will introduce a summary of the
dependency updates a given onboarding PR would produce.

As this is valuable information regardless of whether we're in
onboarding/reconfigure mode or not, we can create a new function for
this, and output it after the `branches info extended`.

We can make sure to indicate when there are vulnerability alert updates
in a separate count to the per-`updateType` calculation, and a running
total.

Co-authored-by: Claude Opus 4.7 <jamie.tanna+claude-code@mend.io>

* chore(workers/repository): add manager-specific breakdowns to "Updates summary"

So we can use this information when providing a summary on
Onboarding/Reconfigure PRs.

Co-authored-by: Claude Opus 4.7 <jamie.tanna+claude-code@mend.io>

* fixup! chore(workers/repository): add manager-specific breakdowns to "Updates summary"

---------

Co-authored-by: Claude Opus 4.7 <jamie.tanna+claude-code@mend.io>
2026-06-15 10:20:57 +00:00
Sebastian Poxhofer 171a591d84 feat(git): validate commit shas (#43988)
* feat(git): validate length commit shas

* test: adapt test mocks

* chore: update import paths

* feat(git): make the validation more strict and support repositories using sha256

* test: add fakeSha function for deterministic git commit shas in tests
2026-06-15 06:36:57 +00:00
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
Jérémy Fauvel 5646cbae8c fix: use lockedVersion for currentVersionTimestamp lookup (#42476)
break line
2026-06-09 09:28:35 +00:00
Jamie Tanna 8c6a8d82e5 test(workers/global): fix typo (#43838) 2026-06-05 16:18:19 +00:00
Jamie Tanna 27a65ebea8 test(workers/repository): simplify config hash tests for onboarding (#43757)
As part of future changes, we'll be making further tweaks to how the
onboarding PR is generated.

However, recent changes to the onboarding PR has proved that the
generation of the hash is quite awkward to work with.

We can use Claude Sonnet's help to refactor this and introduce a test
that helps us understand what the new hashes should be if there are
changes.

Co-authored-by: Claude Sonnet 4.6 <jamie.tanna+claude-code@mend.io>
2026-06-03 10:43:17 +00:00
Jamie Tanna bcecdadedc fix(workers/repository): correctly render schedule for vulnerability alerts (#43743)
* test(workers/repository): use more explicit test case

Otherwise this could pass unnecessarily if either `schedule` or
`automergeScheudle` renders to this.

* test(workers/repository): document `force` doesn't apply in this function

As it should've been performed higher up in the configuration merging.

* fix(workers/repository): correctly render `schedule` for vulnerability alerts

Otherwise we see i.e.

  - Branch creation
    - ""
  - Automerge
    - At any time (no schedule defined)
2026-06-03 06:41:09 +00:00
Jamie Tanna 8fa3d5b4fc fix(workers/repository): don't re-process init error (#43745)
When the `init` phase encounters an error, we're currently processing it
twice.

This leads to "Action Required" Issues losing any error context (as only
the `errorRes`, not the full `error` is returned), making them much less
useful.

We can refactor to:

- not duplicate the handling
- pass around the full `error` so we can log it outside of the `init`
  phase

As noted in #43558.
2026-06-02 17:02:43 +00:00
Jamie Tanna b0eaed712e chore(workers/repository): instrument handleError (#43746)
As it was useful in debugging #43745's multiple calls to raise an
"Action Required" configuration warning.
2026-06-02 16:55:14 +00:00
Michael Kriese 058faaa872 fix(worker/lookup): don't use a range as current version (#43737) 2026-06-02 12:46:05 +00:00
Sebastian Poxhofer 914c64afbd test(linter): zod schema and infered type naming rule (#43736)
* ci: add linting rule for schema and infered types

* refactor: remove usages of Schema and differently named types
2026-06-02 12:07:35 +00:00
Felipe Santos e5b0950c58 feat: apply group settings when only one update is present (#43629)
* feat: add `groupSingleUpdates` option

* Add test coverage for comment

* Remove extra documentation, the description should probably be enough

* Group single updates by default

* Increment docs
2026-06-02 09:21:59 +00:00
Sebastian Poxhofer 15f4bd8eff chore: migrate from zod/v3 to zod/v4 (#43691)
* chore: migrate from zod/v3 to zod/v4

This commit contains the logic changes

* chore: migrate imports from zod/v3 to zod/v4

This contains import updates and adds explicit record keys as zod/v4 requires these now

* ci: enforce usage of zod/v4
2026-05-30 16:01:58 +00:00
RahulGautamSingh 2d0d32c6fd fix(autoreplace): handle digest-only update without replaceString (#42840)
* fix(autoreplace): handle digest-only update without replaceString

* remove unreachable code
2026-05-30 15:37:15 +00:00
mado 0ab2acfb52 fix(workers/repository): skip pending-version check when re-extracted dep lacks resolved version (#43348)
`checkForPendingVersions` (introduced in #41629) previously threw
`WORKER_FILE_UPDATE_FAILED` when the re-extracted dep had none of
`lockedVersion`, `newVersion`, `currentVersion`, or `currentValue`
populated. That aborts the entire `getUpdatedPackageFiles` flow for a
single dep we cannot verify, which is disproportionate to the intent of
the check (flag artifact updates that introduced a pending version).

Demote the abort to a warn-and-continue: if we cannot determine the
resolved version for a single dep, skip the pending-version check for
that dep only and let the rest of the update proceed. The remaining
deps in the same file can still be verified normally, and a
`logger.warn` makes the skip visible without taking down the update.
2026-05-30 06:15:05 +00:00
Felipe Santos 392105b7c6 chore(oxlint): enable unicorn plugin and prefer-node-protocol (#43283)
chore(oxlint): enable unicorn plugin and prefer-node-protocol
2026-05-29 06:55:58 +00:00
RahulGautamSingh c116326bfd fix(config-migration): always reset migration info (#43628)
wrap in try/finally so reset is always called
2026-05-27 13:00:04 +00:00
Björn Kautler 950f9a40a7 fix(lookup): try to find a release for changelog by newVersion if not found by newValue (#38894)
* fix(lookup): try to find a release for changelog by newVersion if not found by newValue

* Review Feedback Vol. 1

* Review Feedback Vol. 2
2026-05-27 11:31:56 +00:00