Loading
Commits on Source 8
-
GitLab Dependency Bot authored
Changelog: Improvements
-
Patrick Rice authored
chore(deps): update dependency golangci-lint to v2.13.2 See merge request !3022
-
GitLab Dependency Bot authored
chore(deps): update module buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go to v1.36.12-20260825204119-511051f7f437.2 Changelog: Improvements
-
Patrick Rice authored
chore(deps): update module buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go to v1.36.12-20260825204119-511051f7f437.2 See merge request !3021
-
Kai Armstrong authored
Callers that want to label or group requests by endpoint have no way to recover the route from a concrete path. The templates exist in the client but withPath interpolates and discards them, so nothing survives to runtime. This adds the machinery only; converting the call sites is a separate commit so this one stays reviewable. route() registers a template and returns it unchanged, so it can be assigned to a package-level variable and still used as a format string. Registering as the package loads, rather than when a call is made, is what lets Routes() describe the whole client instead of only the calls that have happened. Routes() []Route every route, parameters replaced by :id MatchRoute(path) (Route, ok) the route a concrete path belongs to Matching prefers a literal segment over a parameter at each position, mirroring how the API routes, so "users/some-username/keys" resolves to /users/:id/keys rather than the username being taken for a route noun. Unknown paths do not match, which includes endpoints the API serves that this client has not implemented. The API is marked experimental while its shape is being agreed.
-
Kai Armstrong authored
Mechanical follow-up to the route registry: 702 templates across 168 files move from string literals into package-level variables declared next to the service that uses them, so Routes and MatchRoute describe the whole client. Three call sites were normalized so they could share a route with their siblings rather than register a near-duplicate template: AddSSHKeyForUser now passes UserID{user} like ListSSHKeysForUser, so both use users/%s/keys. parseID accepts int64, so this is behaviour preserving. DeleteRegisteredRunnerByID now passes RunnerID{rid} like the other three calls in runners.go, replacing a pre-formatted Sprintf. Archive keeps its optional format suffix, archive%s, which normalizes to /projects/:id/repository/archive. Four routes are used from two files each and are declared in whichever file uses them most. TestWithPathUsesRegisteredRoutes parses the package and fails if withPath is ever handed a string literal, so a new endpoint cannot be added without registering it. -
Timo Furrer authored
feat: register API routes and expose Routes and MatchRoute See merge request !3023
-
semantic-release-bot authored
## 2.63.0 ###
🚀 Features - feat: register API routes and expose Routes and MatchRoute ([!3023](!3023)) by [Kai Armstrong](https://gitlab.com/phikai) ###🔄 Other Changes - chore(deps): update module buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go to v1.36.12-20260825204119-511051f7f437.2 ([!3021](!3021)) by [GitLab Dependency Bot](https://gitlab.com/gitlab-dependency-update-bot) - chore(deps): update dependency golangci-lint to v2.13.2 ([!3022](!3022)) by [GitLab Dependency Bot](https://gitlab.com/gitlab-dependency-update-bot) # [2.63.0](v2.62.0...v2.63.0) (2026-09-04) ### Features * add an API route registry with Routes and MatchRoute ([ba606c78](ba606c78...