Commit Graph

28 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 dfe806f9ac refactor(gerrit): use schema validated getJson instead of getJsonUnchecked (#43777)
* fix(platform/gerrit): replace getJsonUnchecked with validated getJson

Migrate all getJsonUnchecked calls in lib/modules/platform/gerrit/client.ts
to use Zod-validated getJson. Co-locate schemas in schema.ts with lenient
optional fields to ensure backward compatibility with all existing API responses.

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

* strictly follow previous interfaces

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-09 17:23:04 +00:00
Sebastian Poxhofer 0793274b86 refactor: prefer templates rather than + in test files (#43441)
refactor: prefer templates rather than `+`
2026-05-19 09:52:28 +00:00
Felipe Santos 1bbe82400e fix(gerrit): defer change creation to createPr() (#39250)
* fix(gerrit): defer change creation to `createPr()`

Signed-off-by: Felipe Santos <felipe.santos@ericsson.com>

* Refactor hashtags handling

* Add prTitle to all missing commitAndPush()

* Fix gerrit tests

* Add warning when prTitle is set in updatePr

* Remove now useless labels from commitAndPush

* Fix gerrit client coverage

* Fix gerrit scm coverage

* Fix rebase coverage

* Improve TODO about assignees

* Fix formatting

* Fix review comment

* Extract to a pushForReview function

* Fix after #41382

* Fix onboarding

* Cleanup code

* Fix ESLint

* Fix tests

* Restore gitRetry for git.merge

* Fix tests

* Simplify hashtags code

* Delete pendingChangeBranch in pushForReview()

* Fix test name

* Remove unnecessary test comments

* Improve test name again

* Fix another test name

* Delete local branch in Gerrit SCM

* Add test for deleting pending branch

* Add tests for pushForReview()

* Fix test case name

* Improve another test name

* Fix another small test inconsistency

* Fix some code style issues

* Use isUndefined instead

* Fix one small test style issue

---------

Signed-off-by: Felipe Santos <felipe.santos@ericsson.com>
2026-04-28 08:29:26 +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
travisshivers 32bf2bf5c6 fix(gerrit): pass credentials to api calls in initPlatform (#39970)
We need to explicitly pass the gerrit credentials to the api calls
in initPlaform since the host rules for the platform aren't set up
until later on, so the standard http library won't find any credentials
for the gerrit platform yet.

This follows the same pattern as many of the other platforms on renovate
where they also explicitly pass credentials for the api calls made
during their initPlatform.

This appears to have been broken recently due to the recent addition
of an authenticated version api call in
https://github.com/renovatebot/renovate/pull/39223

See https://github.com/renovatebot/renovate/discussions/39969
2025-12-15 08:43:14 +00:00
Felipe Santos c1b45a56b7 feat(gerrit): use most efficient search operators based on Gerrit version (#39223)
* fix(gerrit): use most efficient search operators based on Gerrit version

Signed-off-by: Felipe Santos <felipe.santos@ericsson.com>

* Address review comments

* Use ignore if instead

* Rename client.version to client.gerritVersion

* Update lib/modules/platform/gerrit/client.spec.ts

Co-authored-by: Sebastian Poxhofer <secustor@users.noreply.github.com>

---------

Signed-off-by: Felipe Santos <felipe.santos@ericsson.com>
Co-authored-by: Sebastian Poxhofer <secustor@users.noreply.github.com>
2025-12-12 18:49:01 +00:00
Felipe Santos 28116f7d40 feat(gerrit): support moving changes to different target branches (#39046)
* feat(gerrit): support moving changes to different target branches

Signed-off-by: Felipe Santos <felipe.santos@ericsson.com>

* Update lib/modules/platform/types.ts

---------

Signed-off-by: Felipe Santos <felipe.santos@ericsson.com>
Co-authored-by: Michael Kriese <michael.kriese@gmx.de>
2025-12-11 15:58:45 +00:00
Felipe Santos fe4823678d fix(gerrit): correct comment normalization (#39016) 2025-12-10 22:17:02 +00:00
Felipe Santos fc3f7a8ee7 fix(gerrit): remove memCache to fix prNo coming as null when pr-created (#38957) 2025-10-31 07:47:19 +00:00
Felipe Santos 3ea1611e87 feat(gerrit): handle pagination when querying changes (#38535)
* feat(gerrit): handle pagination when querying changes

* Add noPagination option, rename pageLimit to limit, and JSDoc them

* Rename limit to pageLimit

* Rename test references
2025-10-27 17:36:50 +00:00
Felipe Santos 8db486bf2e feat(gerrit): add support for labels through hashtags (#35900) 2025-07-04 08:44:34 +00:00
Felipe Santos 21042b226a fix(gerrit): various fixes and optimizations (#35661) 2025-06-06 07:27:27 +00:00
Felipe Santos 664b8fe30c feat(gerrit): add message when abandoning change due to Code-Review -2 (#36207) 2025-05-29 10:39:46 +00:00
Felipe Santos 3d68582b8a fix(gerrit): auto-approve without calling gerrit api (#35315) 2025-04-17 13:43:11 +00:00
Felipe Santos e64ca6b852 refactor(gerrit): remove deprecated source branch as hashtags support (#33329) 2025-04-10 17:47:52 +00:00
Michael Kriese 19c115c813 test: cleanup (#34785) 2025-03-13 17:52:09 +00:00
Felipe Santos 73821c6c73 feat(gerrit): Reduce email notifications (#32817) 2024-11-30 05:51:52 +00:00
Felipe Santos f7e4668eff fix(gerrit): improve commit message vs pr title workaround (#32115) 2024-11-12 05:54:01 +00:00
Jonas d554483f88 fix(platform/gerrit): URI encode branch in gerrit's getFile() (#30753) 2024-08-14 07:20:48 +00:00
Felipe Santos 74aa3d777b feat(gerrit): use commit message footers to store source branch name (#29802)
Co-authored-by: HonkingGoose <34918129+HonkingGoose@users.noreply.github.com>
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
2024-07-02 15:00:32 +00:00
Felipe Santos 9841fa00c9 fix(gerrit): commitBody option not being effective (#28774) 2024-05-02 08:39:28 +00:00
Andrea 38df551b97 fix(gerrit): remove quotes from message filter (#28236)
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
Co-authored-by: Rhys Arkins <rhys@arkins.net>
2024-04-09 16:45:51 +00:00
Markus Schulz 9d1e2bd8e7 fix(gerrit): quote the prTitle in search for changes (findPr) (#26750) 2024-01-19 13:58:20 +00:00
Markus Schulz faa1618f2d fix(gerrit): include prTitle in search for changes (findPr) (#26745) 2024-01-19 10:36:01 +00:00
valodzka d8ad99faca fix(platform/gerrit): Check for comment size limit (#26454) 2023-12-30 08:52:31 +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