Files
renovate/lib/modules/datasource/orb
Pete Steyert-Woods 2fc1b5ce67 feat(datasource/orb): use REST API instead of graphql-unstable (#45205)
* refactor(datasource/orb): use REST API instead of graphql-unstable

Switch the orb datasource from the `graphql-unstable` GraphQL endpoint to
the stable CircleCI REST API (`GET /api/v3/orb/packages?filter[name]=`).

The single REST call returns the same fields the datasource needs
(`is_private`, `home_url`, and the nested `orb_versions` with
`created_at`), so behaviour is unchanged for public and private orbs on
circleci.com. Missing orbs are now detected via an empty `data` array
rather than a null `orb` field.

* convert to zod schema

* refactor(datasource/orb): use nullish helper and schema-side transform

Address review feedback:
- use the Nullish schema helper for optional attributes
- catch([]) so orb_versions is never null/undefined
- move the data transform (isPrivate, releases) into the schema; the
  homepage fallback stays in the datasource since it needs the requested
  packageName

* refactor(datasource/orb): drop snapshot and use toEqual assertion

* refactor(datasource/orb): change assertion to deepnullish

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

---------

Co-authored-by: Sebastian Poxhofer <secustor@users.noreply.github.com>
2026-09-03 07:19:11 +00:00
..