Commit Graph

12 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 b106668a95 refactor(oxlint): enable typescript/no-useless-default-assignment (#44419)
- Convert `param: T | undefined = undefined` to optional `param?: T`.
- Drop dead `= false` defaults on the required cache-provider options.
- Make `GraphqlPaginatedContent.nodes/edges` optional so the `= []`
  fallbacks (load-bearing for partial GraphQL connections) are valid.
- Type the unchecked `default_branch` response field as optional so
  the `'HEAD'` fallback is retained.
- Drop `tag = undefined` from the Forgejo/Gitea/GitLab preset configs.

Part of #43845

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-07 16:38:48 +00:00
Sebastian Poxhofer 7573fa98f2 feat(platform/forgejo): validate http request with schemas (#43900)
* fix(platform/forgejo): replace getJsonUnchecked with validated getJson

Migrate all getJsonUnchecked calls in the Forgejo platform module to use
getJson with Zod schemas for response validation. Add comprehensive Zod
schemas to schema.ts and update test mocks to use proper data formats.

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

* simplify by using infered types

* first pass on reducing duplications

* move PrStatus and CommitStatus to schema

* remove code handling BranchStatus values now ensured by schema

* remove now unreachable code

* fix coverage

* use forgejo schemas instead gitea for changelog fetching

* feat: do not abort repo on unrecognized default merge style

* refactor: instead of usages of `?? {}` with a default parameter

* tighten required parameters and move contentString generation to schema

* refactor: merge both content schemas and use a discriminated union

* refactor: move patchJson and postJson to schema validation

* Make body field required

* make schema more strict

* use DeepNullish

* simplify catch

* revert the gitea Content type change

* unify User

* log more nicely if accidentally not a file has been referenced

* Use fakeSha and LongCommitSha schema

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-16 14:22:01 +00:00
Jamie Tanna 0ccf83253f feat(presets): support fetching .jsonc files (#43680)
* test(presets): validate filename construction

Ahead of future changes to add JSONC support, we should cover explicitly
how the filename is constructed.

* feat(presets): support fetching `.jsonc` files

Similar to 6fb540d494, as we now support a
`.jsonc` file for configuration, we should make sure that we can also
use it for a preset.

We can also add additional tests across a few presets to make sure that
we have sufficient coverage.
2026-05-29 15:10:13 +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 8651fe1a1e refactor: fix preset api types (#37137) 2025-07-24 09:15:36 +00:00
Michael Kriese 3b3958ed3a fix(gitea,forgejo): dedupe base64 decode (#37136) 2025-07-23 15:39:03 +00:00
Michael Kriese 1e6a13a4af fix(presets): log platform error messages (#37129) 2025-07-23 13:28:23 +00:00
Michael Kriese 389554163b fix(forgejo): wrong imports (#37128) 2025-07-23 08:47:08 +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