Loading
Commits on Source 7
-
Matt Cockayne authored
Gitea and Forgejo have no gist or snippet feature at all: gitea.com and codeberg.org both answer 404 for /api/v1/gists, /snippets and /pastes, and the SDK carries no service for one. Unlike Sites, this is not implemented for EITHER source type. Sites is advertised on the shared type and refuses at runtime, because whether an instance runs a pages service is configuration. Here there is nothing to configure, so the type assertion fails outright — the honest answer. The test stops someone adding a stub that returns ErrNotSupported from every method, which advertises a capability the forge cannot honour and defeats the assertion callers branch on. Compatibility note: requires forge v0.11.0, which introduces forge.Snippets. Implements spec 0007 D2: 0007 snippets and gists
-
Matt Cockayne authored
-
Matt Cockayne authored
A handle cannot own or enforce copyright, and the estate was split between two holder strings. Names both so the notice identifies a legal person without orphaning the handle.
-
Matt Cockayne authored
-
Matt Cockayne authored
-
Matt Cockayne authored
Migrates to forge v0.12.0, whose ProviderFactory takes an Endpoint rather than a ReleaseSourceConfig. Settings.ReleaseSource becomes Settings.Endpoint, and SettingsFromConfig takes the ROOT configuration rather than a pre-scoped subtree, resolving its own section from the endpoint. Two fields disappear because the endpoint now carries what they held, and both were duplicates that had to be kept in agreement: Settings.SourceType existed so diagnostics could say which of this module's two registrations built the provider. Endpoint.Type is that, already. registration.section declared the configuration subtree a source type resolves from. It was always equal to the source type, and forge.Endpoint.Section derives the subtree from exactly that string, so the field was a second place to get the same answer wrong. The factory now SETS Endpoint.Type from its registration rather than letting it default downstream. That is load-bearing here rather than tidiness: one module serves two source types, and a defaulted Type sent a Codeberg lookup to gitea's configuration section — the exact cross-authentication spec 0001 settled, reintroduced silently. The section isolation tests caught it. TestGiteaProvider_IgnoresAPIVersionParam becomes TestGiteaProvider_TargetsAPIV1. It guarded that an api_version entry in Params was inert; the address carries no Params, so there is no longer a documented-looking key that can be set and quietly do nothing. The positive assertion — the SDK owns the version segment and targets v1 — is what remains worth pinning. Implements forge spec 0008 D1 and D2 for this adapter.
-
Matt Cockayne authored