Commit Graph

14 Commits

Author SHA1 Message Date
Sebastian Poxhofer 5f91549447 feat(gitlab): merge MRs through merge trains via the platform merge queue API (#45722)
* feat(gitlab): merge MRs through merge trains via the platform merge queue API

* feat(gitlab): report MRs waiting on a merge train through isPrInMergeQueue

* test(gitlab): drop targetBranch from mergePr calls

* Apply suggestion from @secustor

* refactor(gitlab): validate the merge train car response with a Zod schema
2026-09-09 15:21:46 +00:00
Stephen Breakey e59b10a17c chore(gitlab): tidy up around gitlab codeowner role support (#44796)
* chore: add zod schema for gitlab getProjectMembers

* chore: swap getRoleAccessLevel regex for startsWith and slice

* chore: drop unnecessary as const
2026-07-23 12:28:44 +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
Aman Agrawal c8fcd63278 refactor(platform/gitlab): fetch detailed_merge_status (#44122)
* refactor(platform/gitlab): changed merge_request to detailed_merge_request.

* refactor(platform/gitlab): changed merge_request to detailed_merge_request in scehma.ts and in pr-cache-tests

* refactor(platform/gitlab): enums added for detailed_merge_requests #44114

* refactor(platform/gitlab): added enums for detailed_merge_status and unit tests modified #44114

* refactor(platform/gitlab): detailed_merge_status field added in pr-cache unit tests

* refactor(platform/gitlab): made detailed_merge_status optional and catch statement to handle newer status for future #44114
2026-07-13 21:28:36 +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
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
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
renovate[bot] 4a2578d18d build(deps): update dependency zod to v4 (main) (#41225)
* build(deps): update dependency zod to v4

| datasource | package | from    | to    |
| ---------- | ------- | ------- | ----- |
| npm        | zod     | 3.25.76 | 4.3.6 |

* fix: zod migration

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
2026-02-18 07:37:50 +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 972495250f fix(gitlab/schema): change sha field to use nullish instead of optional (#39758)
Change sha field to use nullish instead of optional
2025-12-03 13:39:10 +00:00
RahulGautamSingh 6dc48db8e1 refactor(gitlab): use http.getJson (#38688)
* use getJson

* fix schema and tests

* make updated_at & target_branch non-optional

* convert head_pipeline[sha] to LongCommitSha type

* make assignee object nullable

* make head_pipleline nullable

* fix: revert some changes

* fix schema definition

* Apply Suggestions

* fix test

---------

Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
2025-12-03 09:29:46 +00:00
Jamie Tanna 1fc5c91dc3 fix(gitlab): revert "use http.getJson" (#38477)
Revert "refactor(gitlab): use `http.getJson` (#37678)"

This reverts commit 3a04ef7218.
2025-10-08 18:04:43 +00:00
RahulGautamSingh 3a04ef7218 refactor(gitlab): use http.getJson (#37678)
* use getJson

* fix schema and tests

* make updated_at & target_branch non-optional

* convert head_pipeline[sha] to LongCommitSha type
2025-10-08 14:09:30 +00:00
Alessandro Manno f549a868fd fix(platform/gitlab): double pipelines issue (#24500)
Co-authored-by: Sergei Zharinov <zharinov@users.noreply.github.com>
Co-authored-by: Rhys Arkins <rhys@arkins.net>
2023-10-16 06:58:23 +00:00