mirror of
https://github.com/renovatebot/renovate.git
synced 2026-10-26 15:31:53 +00:00
bd86caa165
* 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.