Files
renovate/lib/modules
Sebastian Poxhofer b8f6dbb83e refactor(datasource): move the git host tags datasources onto GitHostTagsDigestDatasource (#46896)
* refactor(datasource): expose the source URL of the git host tags datasources

getSourceUrl() becomes a public instance method of every git host tags datasource. github-tags and gitlab-tags gain it next to a static getSourceUrl(), and the Gitea base derives it from its default registry.

* refactor(datasource/gitea-tags): extend GitHostTagsDigestDatasource

The Gitea and Forgejo tags and releases datasources keep their cache keys and only cache lookups against the public instance, through a new isCacheable() hook of the base class. The cache key of a releases lookup now ends in ':tags' like every other one, in its own namespace.

* refactor(datasource/gitlab-tags): extend GitHostTagsDigestDatasource

The tags, digests and tag commits are cached under the '<registryUrl>:<repo>:<type>' keys of the base class, so the first lookup after the upgrade misses the package cache.

* refactor(datasource/github-tags): extend GitHostTagsDigestDatasource

getReleases() and getDigest() skip the package cache of the base class, because the GraphQL fetcher already caches the tags with their commits and the HTTP client caches the latest commit in memory. The releases now carry their registryUrl like the other tags datasources.

* fix(datasource): only cache git host tags lookups known to be public

A tags lookup may read a private repository, so GitHostTagsDatasource no longer writes it to the package cache by default. Gitea and Forgejo keep caching their public instance; Bitbucket Cloud, Bitbucket Data Center, Azure DevOps and GitLab lookups are cached only with cachePrivatePackages. The Bitbucket main branch cache follows the same rule.

* test(datasource): cover the default registry of github-tags and gitlab-tags

* docs(datasource/github-tags): drop the cache note from getDigest

* refactor(datasource): keep caching git host tags lookups by default

* refactor(datasource): keep getSourceUrl of the git host tags datasources protected

* refactor(datasource): default getRegistryUrl and resolve the URL for isCacheable

* fix(datasource/gitlab-tags): normalise the registry URL like main

* refactor(datasource): cache tag digests only once

* refactor(datasource/github-tags): skip the package cache through a base hook

* refactor(datasource): document getSourceUrl once in the base class

* refactor(datasource/bitbucket-tags): inline the static registry URL helper

* refactor(datasource): rename usePackageCache to useGitHostTagCaching

* refactor(datasource): drop isCacheableFor and useGitHostTagCaching
2026-10-16 09:52:58 +00:00
..