Skip to content

feat: add {version} placeholder interpolation for URL-type sources#3

Merged
blacksd merged 1 commit intomainfrom
feat/url-version-interpolation
Mar 11, 2026
Merged

feat: add {version} placeholder interpolation for URL-type sources#3
blacksd merged 1 commit intomainfrom
feat/url-version-interpolation

Conversation

@blacksd
Copy link
Copy Markdown
Owner

@blacksd blacksd commented Mar 11, 2026

Summary

  • URL-type sources now support {version} placeholder in the url field, resolved to the version value before fetching
  • Validation enforces that all type: url sources include the {version} placeholder, preventing silent version drift between URL path and version field
  • Updated source.schema.json to document the interpolation behavior

Motivation

The version field and URL path could drift independently, as happened with kubevirt (url pointed at v1.7.1, version said v1.6.1) and gateway-api (url at v1.5.0, version at v1.2.1). With interpolation, version becomes the single source of truth. Renovate's custom manager only needs to bump version, and the URL stays correct automatically.

Test plan

  • go test ./internal/source/ passes (ResolvedURL unit tests)
  • go test ./internal/fetcher/ passes (URLFetcher version interpolation integration test)
  • go vet ./... clean
  • Existing sources with type: helm are unaffected
  • Validation rejects type: url sources missing {version} in the URL
  • Validation rejects {version} in URL when version field is empty

Generated with Claude Code

The url field now supports a {version} placeholder that gets resolved
to the source's version field value before fetching. This makes version
the single source of truth, preventing drift between the URL path and
the version field (e.g. kubevirt url pointing at v1.7.1 while version
says v1.6.1). Renovate only needs to bump version, and the URL stays
correct automatically.

Validation requires {version} to be present in all url-type source URLs
and rejects it when version is empty.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@blacksd blacksd merged commit ee6cfe5 into main Mar 11, 2026
2 checks passed
@blacksd blacksd deleted the feat/url-version-interpolation branch March 11, 2026 10:24
@blacksd blacksd added the feature New feature label Mar 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant