Commit Graph

39 Commits

Author SHA1 Message Date
Sebastian Poxhofer 05e1271376 test: use expect().resolves instead of awaiting inside expect (#45672)
Enables the vitest/prefer-expect-resolves oxlint rule and applies its
autofix across the spec suite.
2026-09-04 10:40:46 +00:00
Jamie Tanna c02de67947 fix(reconfigure): capitalise Renovate (#39310) 2026-09-02 08:56:20 +00:00
Jamie Tanna b62fe59594 fix: remove references to "bot" (#39305)
We dropped the "bot" from our terminology long ago, but it looks like
we've got some outdated docs + code that reference it.

We should remove this to keep things consistent.

A `fix`, as we're changing the commit author's name, and log lines.

Co-authored-by: Claude Sonnet 5 <jamie.tanna+claude-code@mend.io>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-09-02 08:56:20 +00:00
Jamie Tanna d1b6830ddf feat(onboarding): show "What to Expect" first in summary view (#44922)
When using the "summary view", in the case we hit platform limits, in
Onboarding PRs or Reconfigure PR comments, we should prioritise the
"What to Expect" as it provides a more actionable "executive summary" of
what's needed in the repository.

Co-authored-by: Claude Sonnet 5 <jamie.tanna+claude-code@mend.io>
2026-08-21 11:53:08 +00:00
Jamie Tanna 4593b9b5a6 refactor(workers/repository): extract PR body template helpers for onboarding/reconfigure (#45382)
* refactor(workers/repository): extract PR body template helpers for onboarding/reconfigure

As part of follow-up changes to reorder the "summary view", we need to
extract the core logic out for onboarding/reconfigure PRs.

Given the tests haven't needed to change, we can see this is a perfect
in-place rewrite.

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

* fixup! refactor(workers/repository): extract PR body template helpers for onboarding/reconfigure

Adding existing missing coverage.

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

---------

Co-authored-by: Claude Sonnet 5 <jamie.tanna+claude-code@mend.io>
2026-08-21 10:52:32 +00:00
Jamie Tanna 969d1a1c49 feat(onboarding): use summary view if hitting platform limits (#44256)
As part of #41502, we're introducing a Platform-limit-aware
onboarding/reconfigure flow that will provide a summary where
appropriate.

This improves the experience where onboarding a large monorepo to
Renovate, especially when it produces an onboarding/reconfigure PR that
is too large to fit within Platform limits.

If we detect the Platform limits being exceeded for a given PR, we'll
switch to the "summary" view.

This builds on top of 4fbfc6095a and bcd44b991f, which introduced the
main changes this then enables.

Co-authored-by: Claude Sonnet 4.6 <jamie.tanna+claude-code@mend.io>
2026-07-21 18:02:10 +00:00
Sebastian Poxhofer 1e03699cd6 test: add linter for as LongCommitSha in test files (#44681)
* test: add linter for `as LongCommitSha` in test files

Adds a custom oxlint rule `renovate/prefer-fake-sha-in-specs` that flags
`as LongCommitSha` casts in spec files and suggests the deterministic
`fakeSha()` helper from `test/util` instead. Enabled at error level for
`**/*.spec.ts` and `test/**`; all 131 pre-existing casts across 22 spec
files replaced.

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

* Update lib/modules/platform/bitbucket-server/index.spec.ts

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-20 10:08:09 +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
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
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
Jamie Tanna 219f4e96ed perf(workers/repository): log reconfigure branch cache at TRACE (#43487)
On a sufficiently large repository, this log line would lead to the Node
process being killed due to reaching the Node VM's maximum string
length, as per:

  import { constants } from 'node:buffer';
  console.log(constants.MAX_STRING_LENGTH); // ~536MB

This happens because for each update we're including in
`reconfigureBranchCache.ExtractResult`, we include the `BranchConfig`
which is effectively all Renovate config options.

On a sufficiently large repository, this hits size limits, but given
this isn't a particularly widely used log line for debugging, moving
this to a TRACE is a sufficient step.

We can continue to keep the `reconfigureBranchSha` and `isConfigValid`
fields in the original log line (albeit now top-level).
2026-05-20 16:06:36 +00:00
Sebastian Poxhofer 73b90e958b refactor: remove string concetation for production code (#43442)
refactor: prefer templates rather than `+`
2026-05-19 13:31:27 +00:00
Sergei Zharinov 9d857c1f68 refactor(lint): Organize imports with biome (#40966) 2026-02-06 13:40:01 +00:00
Sergei Zharinov 930cf6633c refactor: Rewrite imports with .ts extensions (#40700)
fix: Additional vi.mock path corrections and prettier formatting
2026-01-26 22:48:17 +00:00
RahulGautamSingh 7eb1ee9ed7 fix(reconfigure): migrate before validating (#40647)
migrate before validating
2026-01-26 19:09:10 +00:00
Michael Kriese c641239c19 fix: use stricter types for renovate config (#39594)
* fix: use stricter types for renovate config

* fix: revert changes

* Apply suggestions from code review
2025-11-28 13:16:27 +00:00
RahulGautamSingh 76f911041a refactor: use named exports (#39196)
* use named exports

* fix test

* add missing imnport

* fix prettier
2025-11-10 12:00:35 +00:00
renovate[bot] b4ed9e65d9 chore(deps): update dependency @vitest/eslint-plugin to v1.3.23 (main) (#38702)
* chore(deps): update dependency @vitest/eslint-plugin to v1.3.23

| datasource | package               | from   | to     |
| ---------- | --------------------- | ------ | ------ |
| npm        | @vitest/eslint-plugin | 1.3.16 | 1.3.23 |

* remove now unnecessary exceptions

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: secustor <sebastian@poxhofer.at>
2025-10-31 07:50:48 +00:00
renovate[bot] 1280fe4dc7 chore(deps): update dependency @vitest/eslint-plugin to v1.3.16 (main) (#38502)
* chore(deps): update dependency @vitest/eslint-plugin to v1.3.16

| datasource | package               | from   | to     |
| ---------- | --------------------- | ------ | ------ |
| npm        | @vitest/eslint-plugin | 1.3.13 | 1.3.16 |

* fix linting errors

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: secustor <sebastian@poxhofer.at>
2025-10-13 09:24:15 +00:00
Grégoire Paris 6f1c64fec8 fix: use a instead of an in reconfigure PR comment (#38199) 2025-09-24 11:56:48 +00:00
Grégoire Paris 0579f6c670 feat: print reconfigureBranch (#38181) 2025-09-23 15:33:04 +00:00
RahulGautamSingh 5adb95593f feat(config): variables (#35350) 2025-07-06 07:24:33 +00:00
RahulGautamSingh 326cfb5b0d feat: interactive reconfigure pr (#34696)
Co-authored-by: Rhys Arkins <rhys@arkins.net>
2025-06-15 22:04:26 +00:00
RahulGautamSingh 380a331ce5 refactor: move utility fn (#35478) 2025-04-22 10:14:42 +00:00
RahulGautamSingh 02a6deaa7e feat(gitea): find prs from other authors (#35065) 2025-03-31 10:51:33 +00:00
Michael Kriese 19c115c813 test: cleanup (#34785) 2025-03-13 17:52:09 +00:00
Michael Kriese 4f60a8b7fe test: mock git globally (#34783) 2025-03-13 15:48:02 +00:00
Michael Kriese 997c23502e test: migrate to vitest (#34475)
Co-authored-by: HonkingGoose <34918129+HonkingGoose@users.noreply.github.com>
2025-02-26 09:35:54 +00:00
Ben Brown d0c05c9c6b fix(reconfigure): massage config prior to validation (#34348) 2025-02-21 03:47:10 +00:00
RahulGautamSingh 39fb207a83 refactor(workers/reconfigure): update code structure (#33340) 2025-01-08 12:18:30 +00:00
Jamie Tanna 00a20a8f7d fix(local): don't validate reconfigure branch (#31009) 2024-08-25 18:09:26 +00:00
Sebastian Poxhofer 3681b2a945 chore: eslint to enforce for typed imports (#30844) 2024-08-19 13:15:27 +00:00
Rhys Arkins 49971b9af1 refactor(config): use enum for config type (#27891) 2024-03-13 05:11:40 +00:00
RahulGautamSingh 6b41552bbd feat(config): warn if globalOnly option found in repo config (#24561)
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
2024-01-16 10:42:26 +00:00
RahulGautamSingh 5f163552a9 fix(reconfigure/pr): find reconfigure pr separately (#25954)
Co-authored-by: Rhys Arkins <rhys@arkins.net>
2023-12-29 12:55:11 +00:00
RahulGautamSingh 3ed295cf94 feat(config): custom status checks (#26047)
Co-authored-by: HonkingGoose <34918129+HonkingGoose@users.noreply.github.com>
Co-authored-by: Rhys Arkins <rhys@arkins.net>
2023-12-14 16:20:50 +00:00
Tom Vervoort c82b9afb36 refactor: strongly type commit SHAs (#25207)
Co-authored-by: Rhys Arkins <rhys@arkins.net>
2023-11-22 06:30:19 +00:00
Sergei Zharinov b69416ce17 refactor(prettier): Force trailing commas (#25631) 2023-11-07 15:50:29 +00:00
RahulGautamSingh 32340dbc47 feat(config): validate reconfigure branch (#24699)
Co-authored-by: HonkingGoose <34918129+HonkingGoose@users.noreply.github.com>
Co-authored-by: Rhys Arkins <rhys@arkins.net>
Co-authored-by: Sebastian Poxhofer <secustor@users.noreply.github.com>
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
2023-11-03 13:31:49 +00:00