monolith/S02 Step 2: Repository listing — repositories
🎯 Why
Part of epic AR Ruby client (monolith/S02). Adds the repository-listing method on top of the Step 1 client foundation at ee/lib/artifact_registry/ (namespace ArtifactRegistry::).
Re-scoped back to
ee/lib. The interim gem packaging was dropped after legal review concluded the client must ship under the EE license (decision thread on gitlab-org/gitlab!246861); the gem MRs are closed. Extracting the client into an EE-licensed gem later is tracked in #607692.
🧭 What
Add the repositories listing method on ArtifactRegistry::Client and the list page object:
repositoriesforwardsformat/kind/sort/order/limit/cursor, parses the JSON array intoRepositoryobjects, and returns next/prev cursors extracted from theLinkheader (RFC 8288; only thecursorquery-parameter value goes into the opaque tokens).- Builds its
:slugpath through the Step 1 path-segment encoder (with the blank-argument and bare-./..guards); lets the primitive's404 -> ApiErrorstand (unresolved slug). ArtifactRegistry::RepositoryPagePODO: theRepositoryarray plus opaquenext_cursor/prev_cursor.
Files
ee/lib/artifact_registry/client.rb(modify: addrepositories)ee/lib/artifact_registry/repository_page.rb(new)ee/spec/lib/artifact_registry/client_spec.rb(modify),ee/spec/lib/artifact_registry/repository_page_spec.rb(new)
✅ Acceptance
In the EE RSpec suite (ee/spec/lib/artifact_registry/): repositories issues GET /api/v1/:slug/repositories with the forwarded query parameters, returns a page of Repository objects and the Link-header cursors from one HTTP call, passes created_by/updated_by through as raw opaque strings, and raises ApiError on a 404 (unresolved slug). The method routes through the shared credentialed request primitive and the shared path-segment encoder.
Covers S02 acceptance criteria 1, 11, and the list 404 -> ApiError branch of 7 (plus 6 via the shared primitive).
🚩 Feature flag
None (dark by absence of a caller).
🔗 Dependencies
- Blocked by Step 1 (client foundation, gitlab-org/gitlab!244245).
- Implemented together with Step 3 in a single MR: gitlab-org/gitlab!245331 (the separate Step 3 MR gitlab-org/gitlab!245812 was folded into it and closed).
- Spec: https://gitlab.com/gitlab-org/ops/artifact-registry/-/blob/main/docs/specs/monolith/S02-ar-ruby-client.md
- Plan (Step 2): https://gitlab.com/gitlab-org/ops/artifact-registry/-/blob/main/docs/plans/monolith/2026-07-02-ar-ruby-client.md#step-2-repository-listing--repositories