Files
renovate/lib/modules
Sebastian Poxhofer bd86caa165 refactor(datasource): share the Gitea datasources with Forgejo (#46095)
* refactor(datasource): share the Gitea datasources with Forgejo

forgejo-tags and forgejo-releases were copies of gitea-tags and gitea-releases, and both -releases datasources re-implemented the digest lookup of the -tags ones. A GiteaDatasource base class now holds the shared implementation; the Forgejo datasources only declare their id, default registry URL, cache namespace and Http client. Results are only written to the shared package cache when they come from the public default instance.

* test(datasource): cover the default registry fallback

`GiteaDatasource.getRegistryUrl()` falls back to the instance's default
registry when the caller passes none, which the datasource dispatcher never
does because it resolves a registry URL first. Call `getTagCommit()` on the
instance instead, where the parameter is declared optional, once per default
registry so the Forgejo case also proves the base class reads the subclass's
`defaultRegistryUrls` rather than the Gitea static field.
2026-09-21 08:25:46 +00:00
..