Commit Graph

61 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
Sebastian Poxhofer ad0b59f8b7 refactor(oxlint): enable vitest/require-to-throw-message (#44421) 2026-07-07 17:47:04 +00:00
Sebastian Poxhofer d004b52a91 test: add coverage for lines detected by pnpm check (#43589)
tests: add coverage for lines detected by pnpm check
2026-05-26 07:53:07 +00:00
Jamie Tanna ff6761ed23 fix(config/global): return default values for GlobalConfig.get (#42113)
* fix(config/global): return default values for `GlobalConfig.get`

As noted in #39949, it can be awkward working with in `GlobalConfig.get`, where
we would previously need to specify the default value when calling `.get`,
which could lead to drift with the defaults for a given config option.

To reduce this risk, we can rely on a given `default` for a configuration
option, providing that as a default.

Because this now definitely returns a value that matches the config option, it
now allows us to remove `!` assertions.

* fixup! fix(config/global): return default values for `GlobalConfig.get`

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>

* fixup! fix(config/global): return default values for `GlobalConfig.get`

* test(presets): remove impossible test

As it's now not possible to set a value as `undefined` (as
`GlobalConfig` will then use the default), this test no longer validates
anything.

* test(workers/repository): add mock

Now `platform` defaults to `github`, we need to mock out the call to
fetch config.

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

* test: coverage

* test: coverage

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Claude Sonnet 4.6 <jamie.tanna+claude-code@mend.io>
2026-05-15 17:10:38 +00:00
Felipe Santos e9e8083223 feat(config-validator): optimize imports to improve speed by 5x (#43048)
Optimize config-validator
2026-05-04 08:48:32 +00:00
zT-1337 ddc46220b9 feat(platform): add support for the SCM-manager (#26866)
* - Added Renovate support for the [SCM-Manager](https://scm-manager.org/)
  - SCM-Manager is a repository management tool like GitHub
  - It is maintained as an open source project by the company [Cloudogu](https://cloudogu.com/en/)
- The SCM-Manager support is not feature complete yet, features like auto merging are still missing
- The SCM-Manager also got added to the documentation as another platform

author  Thomas Zerr <thomas.zerr@cloudogu.com> 1690877165 +0200
committer Eduard Heimbuch <eduard.heimbuch@cloudogu.com> 1706264263 +0100

* Reverted numbering change in markdown docs

* Changed from type to interface, if possible

* Removed axios dependency and using the http layer of renovate instead

* Fixed not using scmm specific mime types for accept header

* Use git from test/util instead

* Add dummy tests for no ops

* Fix some phrasing and spelling issues

* Change scmm to scm-manager and fix SCM-Manager specific content type

* Add supported major versions, review plugin requirement, write permissions is needed

* Change using actual host rules instead of mocking it

* Change use http mocks for testing

* Update docs/usage/getting-started/running.md

Co-authored-by: HonkingGoose <34918129+HonkingGoose@users.noreply.github.com>

* Update lib/modules/platform/scm-manager/index.ts

Co-authored-by: HonkingGoose <34918129+HonkingGoose@users.noreply.github.com>

* Update lib/modules/platform/scm-manager/mapper.spec.ts

Co-authored-by: HonkingGoose <34918129+HonkingGoose@users.noreply.github.com>

* Update lib/modules/platform/scm-manager/readme.md

Co-authored-by: HonkingGoose <34918129+HonkingGoose@users.noreply.github.com>

* Update lib/modules/platform/scm-manager/readme.md

Co-authored-by: HonkingGoose <34918129+HonkingGoose@users.noreply.github.com>

* Update lib/modules/platform/scm-manager/readme.md

Co-authored-by: HonkingGoose <34918129+HonkingGoose@users.noreply.github.com>

* Update lib/modules/platform/scm-manager/readme.md

Co-authored-by: HonkingGoose <34918129+HonkingGoose@users.noreply.github.com>

* Update lib/modules/platform/scm-manager/readme.md

Co-authored-by: HonkingGoose <34918129+HonkingGoose@users.noreply.github.com>

* Fix scm-manager docs link

* Fix linting

* Fix linting

* Throw errors if username or token is not provided by the host rules

* Replace NO-OP with Not implemented

* Remove objects from log messages

* Fix linting

* Fix path to platform config options

* Fix link to self-host-configuration docs

* Fix link to self-host-configuration docs

* Remove the link to the platform config option, because the tests keep failing

* Fix link to self-host-configuration docs

* Remove not needed type cast

Co-authored-by: Michael Kriese <michael.kriese@visualon.de>

* Fix type check of protocol links

* Move scm-manager into util http folder

* Apply linting

* Add maxBodyLength function and its test

* Add test case if protocol links are not an array of links

* Use zod schema for pagination

* Apply linting

* Refactor typing with zod schema

* Fix test description

Co-authored-by: HonkingGoose <34918129+HonkingGoose@users.noreply.github.com>

* Fix test description

Co-authored-by: HonkingGoose <34918129+HonkingGoose@users.noreply.github.com>

* Fix test description

Co-authored-by: HonkingGoose <34918129+HonkingGoose@users.noreply.github.com>

* Fix test description

Co-authored-by: HonkingGoose <34918129+HonkingGoose@users.noreply.github.com>

* Update readme

Co-authored-by: HonkingGoose <34918129+HonkingGoose@users.noreply.github.com>

* Add try catch around fetching the current user

* Switch log statement from info to debug

Co-authored-by: Michael Kriese <michael.kriese@visualon.de>

* Switch log statement from info to trace

Co-authored-by: Michael Kriese <michael.kriese@visualon.de>

* Switch log statement from debug to trace

Co-authored-by: Michael Kriese <michael.kriese@visualon.de>

* Switch log statement from info to trace

Co-authored-by: Michael Kriese <michael.kriese@visualon.de>

* Switch log statement from info to trace

Co-authored-by: Michael Kriese <michael.kriese@visualon.de>

* Switch log statement from info to trace

Co-authored-by: Michael Kriese <michael.kriese@visualon.de>

* Fix linting errors

* Remove credentials check in initRepo

* Fix imports

* Fix zod schema for repositories

* Fix zod schema for pull requests

* Fix 500 error after attempting to update an pr

* Fix wrong typing

* Refactor parameterized tests for better readability

* Refactor SCM HTTP API

* Add setToken functionality

* Remove not needed type definition

Co-authored-by: Michael Kriese <michael.kriese@gmx.de>

* Fix assertion

* Fix istanbul comment

* Change log statement

* Remove type rename

* Move inferred types close to corresponding schemas

* Add platform is experimental

* Remove type renaming

* Fix type imports

* Fix test suite description

* Remove debug log statement

Co-authored-by: Michael Kriese <michael.kriese@gmx.de>

* Fix warning

* Fix paremeterized unit tests with string templates

* Fix spelling

Co-authored-by: HonkingGoose <34918129+HonkingGoose@users.noreply.github.com>

* Fix eslint error

* Convert trace logs to debug logs

* Convert info logs to debug

* Replace manual null and undefinded check with is util

* Rephrase instruction in readme

* Use ensureTrailingSlash instead

* Fix linting

* Keep type and schema together

* Simplify hasAssignees check

* Simplify reviewer mapping

* Remove istanbul comments

* Replace custom scmm header option with renovate native http headers option

* Let the token be passed in initPlatform

* Add description which permissions are needed

* Add support for ignorePrAuthor filter

* Add notes about automerge feature within platform readme

* Add support for fast_forward_only

* Change supported versions due to merge strategy change

* Remove commented code

* Fix import

* Use email schema

* Heed review advice

* Fix import and empty array assertions

* Fix linting issue

* Fix import errors

* Fix removed ignorePrAuthor parameter from initRepo function

* Fix failing unit tests by setting/reseting the global config

* Mark scm-manager as experimental

* Fix zod import path

* Change endpoint configuration, so that user only needs to define origin, but not also the path

* Fix warning of redundant backslash

---------

Co-authored-by: Eduard Heimbuch <eduard.heimbuch@cloudogu.com>
Co-authored-by: HonkingGoose <34918129+HonkingGoose@users.noreply.github.com>
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
Co-authored-by: René Pfeuffer <rene@pfeuffer-web.de>
Co-authored-by: Michael Kriese <michael.kriese@gmx.de>
Co-authored-by: René Pfeuffer <rene.pfeuffer@cloudogu.com>
2026-02-26 13:38:31 +00:00
Sergei Zharinov b02897fab1 refactor(lint): Fix lint violations (#40965)
* refactor(lint): Fix lint violations

* Update lib/modules/versioning/versioning-metadata.spec.ts

Co-authored-by: Michael Kriese <michael.kriese@visualon.de>

---------

Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
2026-02-06 15:34:33 +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
renovate[bot] c8e38bfb9a chore(deps): update dependency @vitest/eslint-plugin to v1.6.5 (main) (#40165)
* chore(deps): update dependency @vitest/eslint-plugin to v1.6.5

| datasource | package               | from  | to    |
| ---------- | --------------------- | ----- | ----- |
| npm        | @vitest/eslint-plugin | 1.5.2 | 1.6.5 |

* chore: fix lint

* chore: fix lint

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
2026-01-13 15:00: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
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
Michael Kriese 8651fe1a1e refactor: fix preset api types (#37137) 2025-07-24 09:15:36 +00:00
Patrick Schratz 6c2bd9d197 feat: add forgejo as a standalone platform (#37075)
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
2025-07-21 14:24:07 +00:00
Michael Kriese 19c115c813 test: cleanup (#34785) 2025-03-13 17:52:09 +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
renovate[bot] 4f1fb3a163 chore(deps): update linters to v8.5.0 (#31349)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Rhys Arkins <rhys@arkins.net>
2024-09-16 07:10:17 +00:00
Markus Schulz b2422d86fd feat: Support for Platform "Gerrit" (#18961)
Co-authored-by: HonkingGoose <34918129+HonkingGoose@users.noreply.github.com>
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
Co-authored-by: Rhys Arkins <rhys@arkins.net>
2023-12-29 17:55:25 +00:00
Sergei Zharinov b69416ce17 refactor(prettier): Force trailing commas (#25631) 2023-11-07 15:50:29 +00:00
RahulGautamSingh 4231b1ae09 feat: predictible json/json5 handling (#24612)
Co-authored-by: Rhys Arkins <rhys@arkins.net>
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
2023-11-06 10:30:11 +00:00
Jamie Tanna 2a548e795c fix: Correct variable interpolation in error message (#24991) 2023-10-03 11:11:55 +00:00
Rhys Arkins 36e2b328bb chore: update types reference 2023-08-15 11:31:15 +02:00
Rhys Arkins bdf9e6adb2 chore: log err.message for preset not found error (#23855) 2023-08-14 13:18:58 +00:00
Sergei Zharinov 11c05fc837 refactor: Default values for GlobalConfig.get (#22967) 2023-06-25 19:34:42 +00:00
Rhys Arkins 93052ec917 feat: platform=local (#22010)
Co-authored-by: Jamie Magee <jamie.magee@gmail.com>
2023-05-10 04:30:12 +00:00
RahulGautamSingh 1013302e0f refactor: exactOptionalPropertyTypes (#20761)
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
2023-03-19 16:09:46 +00:00
renovate[bot] db2aef4553 chore(deps): update jest monorepo to v29.4.1 (#20130)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
2023-02-14 16:00:49 +00:00
Michael Kriese 9bd857c8f8 fix(platform): fix types and docs (#19944)
Co-authored-by: HonkingGoose <34918129+HonkingGoose@users.noreply.github.com>
Co-authored-by: Rhys Arkins <rhys@arkins.net>
2023-01-24 10:05:51 +01:00
Michael Kriese 99054bef68 fix(presets): pass through tag to platform for local (#19102) 2022-11-25 15:54:11 +00:00
Michael Kriese 11a96b72a6 fix(presets): simplify local presets (#19025) 2022-11-22 09:42:44 +01:00
RahulGautamSingh c56588eaba refactor: convert PlatformmId to union (#18458) 2022-11-01 14:46:09 +00:00
Philip 80af0fdf76 feat: Support AWS Code Commit platform (#17076) 2022-10-23 06:48:35 +02:00
Rhys Arkins cdec83463c fix(http): improve error logging (#18454)
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
2022-10-21 10:14:45 +00:00
Michael Kriese 2525f7146b fix(presets): handle null values from azure (#17236) 2022-08-17 15:51:59 +00:00
Michael Kriese 0316a5e62d test: use jest v29 (#17151) 2022-08-16 14:22:29 +02:00
Michael Kriese e5c6f38d75 refactor: enable strict checks (#16168)
* refactor:  enable strict checks

* chore: revert changes

* chore: fix tsconfig
2022-06-21 13:00:21 +02:00
Rhys Arkins cf6885f71a fix(config): move endpoint, platform to GlobalConfig (#15864)
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
2022-06-03 06:43:58 +02:00
Michael Kriese ef470f7f92 feat(config): parse json files as json5 (#15187) 2022-04-29 08:34:55 +00:00
Michael Kriese 982cefff2b refactor(config): strict null checks (#15291)
* refactor(config): strict null checks

* chore: fix test
2022-04-24 22:48:54 +00:00
Michael Kriese 64f5bd5f03 test: enforce lint style rules (#15085) 2022-04-12 14:49:49 +00:00
Rhys Arkins dca3418bbd refactor: lib/modules (#14488)
Moves datasource, manager, platform and versioning code from lib/ into new lib/modules/

BREAKING CHANGE: External tools must update paths to datasource, manager, platform and versioning
2022-03-04 09:04:02 +01:00
Rhys Arkins 68a4415eb4 refactor(config): rename preset packageName/pkgName to repo (#14453) 2022-02-28 17:39:44 +01:00
Michael Todorovic 7579875415 feat: support preset versioning with git tags (#11565)
Co-authored-by: Rhys Arkins <rhys@arkins.net>
Co-authored-by: HonkingGoose <34918129+HonkingGoose@users.noreply.github.com>
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
Co-authored-by: Sergei Zharinov <zharinov@users.noreply.github.com>
2021-11-05 13:12:47 +00:00
Maksim 1f86b71fd5 refactor: constants (#11690) 2021-10-06 07:43:32 +02:00
Sergei Zharinov 5f4b9f9a3a test: Fix test descriptions and enforce it via new linting rule (#11285) 2021-08-18 05:46:56 +00:00
Sergei Zharinov 2625858d59 refactor(config): Explicit asserts instead of lonely snapshots (#11174) 2021-08-09 10:21:51 +02:00
Sergei Zharinov 1392955a04 refactor: Identify tests relying on single snapshots (#11150)
Co-authored-by: Jamie Magee <jamie.magee@gmail.com>
2021-08-07 23:43:34 +00:00
Sergei Zharinov ce51f05cef feat(test): Detect test utils callers and simplify helpers (#9707) 2021-04-26 16:15:03 +02:00
Sergei Zharinov b160644db7 feat(preset): Support Azure local presets (#9458) 2021-04-08 19:49:46 +02:00
Sergei Zharinov 0a68e19d73 feat(presets): Support Bitbucket Cloud local presets (#9422) 2021-04-07 11:14:45 +02:00