Commit Graph

98 Commits

Author SHA1 Message Date
Jamie Tanna 69a629031b feat(templates): always expose renovateVersion (#44969)
As noted in #44756, this would allow templates across Renovate's
different usages to be able to use the `renovateVersion` string as a
template variable.

Co-authored-by: Claude Sonnet 5 <jamie.tanna+claude-code@mend.io>
2026-07-30 16:01:51 +00:00
Jamie Tanna 2d0bd99308 feat(self-hosted): make user-agent templatable (#43376)
* feat(self-hosted): make `user-agent` templatable

For Mend-hosted apps, it would be useful to provide a little bit more
information for where a Renovate HTTP request is coming from.

To provide more control over the generated field, we can make it
templatable, with the option to specify the `renovateVersion`.

As this now exposes Handlebars syntax to the user, we should be clear
that this `supportsTemplating`, and document with tests what this
allows.

Co-authored-by: Claude Sonnet 4.6 <jamie.tanna+claude-code@mend.io>

* fixup! feat(self-hosted): make `user-agent` templatable

* fixup! feat(self-hosted): make `user-agent` templatable

As we're now returning the defaults in `GlobalConfig.get` calls.

Co-authored-by: Claude Sonnet 4.6 <jamie.tanna+claude-code@mend.io>

---------

Co-authored-by: Claude Sonnet 4.6 <jamie.tanna+claude-code@mend.io>
2026-05-20 16:27:25 +00:00
RahulGautamSingh 71077bdc92 fix: use handlebars.parse() for template validation (#43316)
* fix: use handlebars.parse() for template validation

* readd todo

* Update lib/util/template/index.ts

Co-authored-by: Jamie Tanna <github@jamietanna.co.uk>

---------

Co-authored-by: Jamie Tanna <github@jamietanna.co.uk>
2026-05-13 14:14:11 +00:00
RahulGautamSingh 68cc0f27b2 docs(config/options): add supportsTemplating field (#41859)
* supportsTemplating field

* fix ci issue

* fix ci issue

* move tip below table

* apply suggestions

* docs: show list of options that support templating

* jsodc explanations for internal fields

* add test to ensure no option that applies template.compile() missed supportsTemplating=true

* apply review suggestions

* fix bad merge

* add filePatterns and commands to the list
2026-05-12 06:45:51 +00:00
Sebastian Poxhofer 990c64e0f3 fix(template): do not escape html character with double curly brackets (#42136) 2026-03-25 15:29:25 +00:00
David Xia b96fbcbb9f docs: Fix typo in newDigestShort description (#41796)
Fix typo in newDigestShort description
2026-03-11 12:15:07 +00:00
Sergei Zharinov c5b0a74f82 refactor: Remove constructor parameter properties (#40712) 2026-01-27 11:16:26 +00:00
Sergei Zharinov 930cf6633c refactor: Rewrite imports with .ts extensions (#40700)
fix: Additional vi.mock path corrections and prettier formatting
2026-01-26 22:48:17 +00:00
RahulGautamSingh 214e1da38d feat(config): allow template fields in allowedVersions (#38922)
* handlebars: regsiter add helper

* allow template fields in allowedVersions

* fix test

* fix doc example

* remove comments

* Apply Suggestions

* use empty object instead of undefined

* template(helpers/add): handle undefined/null

* Apply Suggestions

* Apply suggestion from @RahulGautamSingh

* Apply suggestion from @RahulGautamSingh

* fix conflict

* remove unused function

* fix lint issue

* fix test

* Update docs/usage/configuration-options.md

Co-authored-by: Anne Stellingwerf <1637358+astellingwerf@users.noreply.github.com>

* prettier

* throw error if invalid inputs used

---------

Co-authored-by: Anne Stellingwerf <1637358+astellingwerf@users.noreply.github.com>
2025-12-11 14:52:15 +00:00
Michael Kriese c641239c19 fix: use stricter types for renovate config (#39594)
* fix: use stricter types for renovate config

* fix: revert changes

* Apply suggestions from code review
2025-11-28 13:16:27 +00:00
RahulGautamSingh 76f911041a refactor: use named exports (#39196)
* use named exports

* fix test

* add missing imnport

* fix prettier
2025-11-10 12:00:35 +00:00
Anne Stellingwerf cf7997ad62 chore: validate all handlebars helpers are documented (#38932)
* ci: validate all Handlebars helpers are documented

* ci: validate all Handlebars helpers are documented

* chore: validate all handlebars helpers are documented

* chore: validate all handlebars helpers are documented
2025-11-02 12:15:10 +00:00
RahulGautamSingh 9fe43ea69c feat(replacements): improve Package field for prs (#36815) 2025-07-13 08:25:33 +00:00
Amund Tenstad f55b480ebe feat: add decodeBase64 handlebars helper (#36660)
Co-authored-by: Michael Kriese <michael.kriese@gmx.de>
2025-06-23 18:29:36 +00:00
Colin O'Dell c5a53695b7 feat(config)!: add minor version to default branchTopic to support separateMultipleMinor (#35606)
Changes the default branchTopic to include the minor version when separateMultipleMinor is enabled, ensuring that separateMultipleMinor works properly when hashedBranchLength is also set.

BREAKING CHANGE: This will be a breaking change for any users that have customized their branchTopic and use separateMultipleMinor=true. In those cases, the minor version version will no longer be included in the branch names until they make a similar modification to their branchTopic. For all other users (who haven't set branchTopic or separateMultipleMinor) the behavior should be unchanged.
2025-06-19 11:01:03 +02:00
Adam Setch 74c87b41e9 feat: convert sourceDirectory to a template eligible config (#32701)
Signed-off-by: Adam Setch <adam.setch@outlook.com>
2024-11-26 05:43:20 +00:00
Rhys Arkins a021e9fe6d feat: currentVersionAgeInDays, newVersionAgeInDays (#31818) 2024-10-10 13:17:31 +00:00
Daniel Hebestreit ed6bcd7b9d feat(template): allow releaseTimestamp & currentVersionTimestamp (#31286) 2024-09-09 17:49:39 +00:00
Michael Kriese 1f65d31601 feat(templates): allow isMinor (#30966) 2024-08-22 16:02:08 +00:00
Aleksandr Mezin 0b3ba6f0ab refactor(template): remove unused containsTemplates() (#30907) 2024-08-20 07:45:39 +00:00
Aleksandr Mezin b55866031d fix(template): avoid false "Disallowed variable name" (#30892) 2024-08-19 21:52:11 +00:00
Aleksandr Mezin f7530157c5 feat(template): add lookupArray and distinct helpers (#30618)
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
2024-08-19 14:05:35 +00:00
Sebastian Poxhofer 2a74013dfc feat(templates): add split helper function (#30673)
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
2024-08-11 06:51:44 +00:00
Yohei Ueki d77d03b849 feat(template): add toJSON, toArray and toObject helpers (#30633)
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
2024-08-08 12:02:32 +00:00
Aleksandr Mezin 9305923558 fix(template): allow prBodyDefinitions in templates (#29893) 2024-06-28 08:29:02 +00:00
HonkingGoose 2d7bf51eba refactor(lib/util/template): fix typo (#29343) 2024-05-30 19:03:50 +00:00
Ілля Мазуряк c09b9a72fb feat: Add newPatch as a variable (#29341) 2024-05-30 11:48:12 +00:00
Juan Carlos Blanco Delgado e4020c118e feat: adding includes helper for templating (#28148) 2024-03-27 19:23:17 +00:00
Rhys Arkins e500e5048d feat(config): expose topLevelOrg, templateOrg to templates (#27997) 2024-03-18 19:42:30 +00:00
Rhys Arkins 55205fbc71 feat: expose branch depTypes for templating (#27948) 2024-03-15 11:24:05 +00:00
Yun Lai 397dda5bd0 feat: allow packageScope in template compilation and add packageScope in maven datasource (#27925)
Co-authored-by: Rhys Arkins <rhys@arkins.net>
2024-03-15 08:51:23 +00:00
renovate[bot] 4c2ce97bb4 build(deps): update dependency prettier to v3.2.2 (#26755)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Rhys Arkins <rhys@arkins.net>
2024-01-21 08:20:41 +00:00
Roman 2438616996 feat(templating): adds encodeBase64 handlebars helper (#26197)
Co-authored-by: Rhys Arkins <rhys@arkins.net>
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
2023-12-11 14:18:49 +00:00
RahulGautamSingh 970586c086 refactor: use re2 (#26088) 2023-12-02 09:13:35 +00:00
Michael Kriese 6af2be726c fix(templates): use re2 for replace helper (#26019) 2023-11-29 01:29:32 +00:00
Sebastian Poxhofer a9e50fd48d fix(template/category): Replaces not working templating field category with categories (#25735) 2023-11-13 21:07:37 +00:00
renovate[bot] e5cbbaaf09 build(deps): update dependency prettier to v3 (#23627)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Sergei Zharinov <zharinov@users.noreply.github.com>
2023-11-07 17:12:01 +00:00
Sergei Zharinov b69416ce17 refactor(prettier): Force trailing commas (#25631) 2023-11-07 15:50:29 +00:00
Rhys Arkins 6ec9d1d62a fix(templating): allow category field (#25075) 2023-10-06 11:34:21 +02:00
Sebastian Poxhofer 11e30a08f6 refactor: move getChildProcessEnv to break dependency loop (#23144) 2023-07-04 20:34:08 +00:00
Adam Setch 0296810cd6 feat(template): allow isGroup (#22331) 2023-05-21 16:31:21 +00:00
Adam Setch 1c82218197 feat(vulnerabilities): handle medium and unknown severities (#22257)
Co-authored-by: Jamie Magee <jamie.magee@gmail.com>
2023-05-16 15:38:23 +00:00
Adam Setch a2e036e334 feat(vulnerabilities): set, maintain and expose vulnerabilitySeverity for templated fields (#21939) 2023-05-11 15:00:20 +00:00
Brenton Alker 0913787540 fix(template): Proxy Compile Input loses values from arrays (#21943) 2023-05-03 05:58:33 +00:00
William Boman bf0f7e2b82 feat(template): add equals helper (#21385) 2023-04-09 05:24:04 +00:00
Adam Setch 91fd1757f6 feat(template): indentation capture group (#21193) 2023-03-31 05:39:06 +00:00
Rhys Arkins 98247d34f3 fix(templates): try/catch handlebars compile (#19794)
Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
2023-01-14 09:35:33 +01:00
Marek Grzenkowicz 2cd10769f2 feat(template): use environment variables in templates (#19301) 2023-01-03 10:55:41 +00:00
William Boman aecfcdbb3c feat(templates): add decodeURIComponent helper (#19616) 2022-12-31 09:25:06 +00:00
Michael Kriese 2546c03f6c feat(changelogs): defer retrieval if not required for templates (#17073) 2022-08-10 06:19:17 +00:00