Commit Graph

49 Commits

Author SHA1 Message Date
RahulGautamSingh 614b15d22b fix(prune): skip branch pruning when branchPrefix is empty (#43891)
* fix(prune): skip branch pruning when branchPrefix is empty

* remove todo

* debug -> awrn
2026-09-02 20:03:42 +00:00
Sebastian Poxhofer c32e2391a0 refactor(linters): add prefer-coerce-object rule (#45493)
Refs #45216

The object counterpart to `prefer-coerce-array`: `x ?? {}` becomes
`coerceObject(x)`. The rule flags a `??` whose default is a bare `{}`
literal, so a populated default or an asserted `({} as Foo)` still
passes; a `x ?? y ?? {}` chain maps onto `coerceObject(x, y)`.

Every hit across `lib/` converted cleanly, so no disable comments were
needed.
2026-08-28 09:27:59 +00:00
Sebastian Poxhofer 97327c3d28 refactor(linters): add prefer-coerce-array rule (#45492)
* refactor(linters): add prefer-coerce-array rule

Refs #45217

`x ?? []` and `coerceArray(x)` say the same thing, but only the second
one is searchable and consistent. The rule flags a `??` whose default is
a bare `[]` literal; a non-empty default or an asserted `([] as Foo[])`
still passes.

Applying it across `lib/` surfaced three spots the helper cannot cover,
which keep `?? []` with a disable comment or a narrower fix:

- `package-files.ts` destructures a tuple, which `coerceArray()` widens
- `generate.spec.ts` defaults `matchAll()`, an iterator rather than an array
- `mise/upgradeable-tooling.ts` declares a `Record` return, so its
  `?? []` fallback was wrong to begin with and becomes `coerceObject()`

* refactor(platform/github): hoist the GHE version header lookup

`Object.entries(...).find()` returns a tuple, and defaulting it with
`?? []` only to destructure the second element reads as an array
default when it is not one. Name the found entry instead, which drops
the `?? []` rather than routing a tuple through `coerceArray()`.
2026-08-28 09:27:58 +00:00
Sebastian Poxhofer 41da033756 refactor: remove escapeRegExp and replace with RegExp.escape (#45322) 2026-08-18 06:24:47 +00:00
renovate[bot] 196101a6bb chore(deps): update dependency oxlint-tsgolint to v0.25.0 (main) (#44424)
* chore(deps): update dependency oxlint-tsgolint to v0.25.0

| datasource | package         | from   | to     |
| ---------- | --------------- | ------ | ------ |
| npm        | oxlint-tsgolint | 0.23.0 | 0.25.0 |

* chore: fix new no-unnecessary-type-assertion findings

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

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Sebastian Poxhofer <sebastian.poxhofer@stedi.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-28 07:04:21 +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 73b90e958b refactor: remove string concetation for production code (#43442)
refactor: prefer templates rather than `+`
2026-05-19 13:31:27 +00:00
RahulGautamSingh ff037fa7c2 fix(prune): use configured base branch when single non-default baseBranchPatterns is set (#43152) 2026-05-07 17:09:10 +00:00
Johannes Feichtner ae786755ab fix(repository/finalize): skip branch pruning when defaultBranch is unavailable (#42000) 2026-03-19 16:08:04 +00:00
Johannes Feichtner 18bcf81283 fix(repository/finalize): avoid pruning crash when base branches are not resolved yet (#41928) 2026-03-15 12:02:49 +00:00
RahulGautamSingh da50c75c49 refactor: move onboardingPrTitle to InheritConfig (#41376)
* refactor: move onboardingPrTitle to InheritConfig

* remove unwanted flat clone
2026-02-22 18:32:16 +00:00
RahulGautamSingh 7a8dcdbd01 refactor(config/inherit): move onboardingBranch to InheritConfig (#40865)
* move onboardingBranch to InheritConfig

* fix lint issue

* fix import order

* more fixrs

* fix import

* fix imports
2026-02-15 08:17:11 +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
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
Sergei Zharinov 14f69984cc fix: Reorder saveCache and pruneStaleBranches in repository finalization (#39072)
* fix: Reorder saveCache and pruneStaleBranches in repository finalization

* Remove unused variable in repository cache save method

* Update lib/workers/repository/finalize/index.ts
2025-11-04 19:13:10 +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
RahulGautamSingh 95ea2c9078 fix(branchPrefix): include base branch name iff multiple bases expected (#35423)
* use branchPrefix if multiple base branches expected

* fix test

* fix coverage

* apply suggestions

* apply suggestions

* use utility fn

* refactor tests

* fix test

* major overhaul: use baseBranches field internally

suggested by @secustor

* refactor: cleanup

* test: use better descriptions

* add tests

* fix logic

* fix test

* exclude unlisted versions when finding latestStable

---------

Co-authored-by: Rhys Arkins <rhys@arkins.net>
2025-10-20 06:27:56 +00:00
Jamie Tanna d43af5a5be chore(orphan): log skipped branch names (#38522)
As it makes it more straightforward to determine which branch is being
marked as "orphaned" when reading the logs.
2025-10-14 10:07:06 +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
RahulGautamSingh 3691ff90b2 feat(config): baseBranchPatterns (#35579) 2025-07-14 19:05:27 +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
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
Trim21 6e5731b554 test: migrate from jest to vitest (#34499) 2025-02-26 14:18:38 +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
RahulGautamSingh 39fb207a83 refactor(workers/reconfigure): update code structure (#33340) 2025-01-08 12:18:30 +00:00
Michael Kriese 159927b3b2 fix(repo/finalize): prune with different base branches (#31357) 2024-09-12 11:50:16 +00:00
Sebastian Poxhofer 3681b2a945 chore: eslint to enforce for typed imports (#30844) 2024-08-19 13:15:27 +00:00
RahulGautamSingh f06b4bb9cd refactor: move config migration logic (#30801) 2024-08-15 10:23:12 +00:00
Aaron Moat 03919bbfef feat(git)!: determine branch modification based on all branch commits (#28225) 2024-07-25 15:28:16 +02:00
Philip 7392dbe631 fix(onboarding): onboarding prs can have semantic prefixes causing repo to skip onboarded status. (#29285)
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
2024-05-28 08:02:02 +00:00
Sebastian Poxhofer 481aa216b2 feat(instrumentation/reporting): add report option (#26087)
Co-authored-by: HonkingGoose <34918129+HonkingGoose@users.noreply.github.com>
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
2024-03-17 09:22:42 +00:00
travisshivers db852425a6 chore(logging): log the new and current digest in the branch info (#27810) 2024-03-08 17:58:20 +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
Michael Kriese 84a97a62fa test(perf): improve test speed (#24323) 2023-09-08 11:40:04 +00:00
Michael Kriese 2431c5a6b6 fix: better branch code coverage (#24274) 2023-09-06 13:35:52 +00:00
kroonprins 03636915e4 feat(platform/azure): check targetBranch when finding PRs (#23941)
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
Co-authored-by: Rhys Arkins <rhys@arkins.net>
2023-08-25 08:26:14 +00:00
Rhys Arkins ba8c2bab83 fix: Revert "feat: Enhance lookup logs to show branches extended info" (#23988) 2023-08-21 12:26:10 +02:00
Rhys Arkins 36e2b328bb chore: update types reference 2023-08-15 11:31:15 +02:00
Philip fe039fea63 feat: Enhance lookup logs to show branches extended info (#23696)
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
2023-08-14 07:19:04 +00:00
RahulGautamSingh 18c2850f20 refactor(test): use minimal config objects (#22769) 2023-06-15 04:33:56 +00:00
RahulGautamSingh be2a89520b refactor: replace as assertions (#22442) 2023-06-05 19:18:30 +00:00
Gabriel-Ladzaretti d88d63b4f9 feat(config-error): raise a warning issue for misconfigured matchConfidence (#22296)
Co-authored-by: HonkingGoose <34918129+HonkingGoose@users.noreply.github.com>
2023-05-18 17:02:13 +00:00
Philip c6d7168f44 feat: log extended branch summary (#22056) 2023-05-18 05:59:43 +00:00
Gabriel-Ladzaretti 81b69bb4ef feat(logs): log default branch in branch summary (#21855) 2023-04-28 04:31:15 +00:00
HonkingGoose 6a446499f7 refactor: rename finalise to finalize (#21278) 2023-04-01 10:00:42 +00:00