Skip to content

Conversation

@tibuntu
Copy link

@tibuntu tibuntu commented Dec 5, 2025

Changes

  • Added template compilation for sourceUrl in applyPackageRules function
  • Added two test cases to verify template compilation works correctly
  • Updated documentation with template support explanation and example

The implementation follows the same pattern as overrideDepName and overridePackageName template compilation, ensuring consistency with existing code.

Context

Please select one of the following:

AI assistance disclosure

Did you use AI tools to create any part of this pull request?

Please select one option and, if yes, briefly describe how AI was used (e.g., code, tests, docs) and which tool(s) you used.

  • No — I did not use AI for this contribution.
  • Yes — minimal assistance (e.g., IDE autocomplete, small code completions, grammar fixes).
  • Yes — substantive assistance (AI-generated non‑trivial portions of code, tests, or documentation).
  • Yes — other (please describe):

This PR was created with AI assistance (Claude/Cursor AI). The AI was responsible for:

  • Implementing the template compilation feature in lib/util/package-rules/index.ts
  • Writing the test cases in lib/util/package-rules/index.spec.ts
  • Updating the documentation in docs/usage/configuration-options.md
  • Researching the codebase to understand existing patterns and conventions
  • Following the repository's development guidelines and best practices

Documentation (please check one with an [x])

  • I have updated the documentation, or
  • No documentation update is required

How I've tested my work (please select one)

I have verified these changes via:

  • Code inspection only, or
  • Newly added/modified unit tests, or
  • No unit tests, but ran on a real repository, or
  • Both unit tests + ran on a real repository

Add template compilation support for sourceUrl in package rules,
allowing users to dynamically construct source URLs using template
syntax. This enables use cases like OpenTofu providers where the
source URL needs to be constructed from the package name.

Closes renovatebot#35974
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support template compilation for sourceUrl

1 participant