Expose changelogContent in custom datasource responses #45328
MindTooth
started this conversation in
Suggest an Idea
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Tell us more.
Expose
changelogContentin custom datasource responsesFollow-up to #35327, which added
changelogContentsupport to Renovate datasource releases.I have started to make wrappers that provide
releases:consumed by the custom datasource. However, currently there is no easy way to create a changelog. I hope that this will fix that.Test branch: https://github.com/MindTooth/renovate/tree/feat/custom-datasource-changelog-content
Problem
Releasealready supports per-releasechangelogContent, and Renovate's lookup/changelog pipeline embeds it in the pull request body when the selected target release provides it.However, a
customdatasource validates its transformed response withReleaseResultZod. The per-release schema acceptschangelogUrl, but notchangelogContent. As a result, Zod removeschangelogContentfrom a custom datasource response before it reaches the existing changelog pipeline.This means custom datasources cannot use the feature that was added in #36340.
Proposal
Allow this optional field on each custom datasource release:
Place it alongside
changelogUrlinlib/modules/datasource/custom/schema.ts.For example:
{ "releases": [ { "version": "1.21.2", "changelogUrl": "https://example.invalid/releases/1.21.2", "changelogContent": "### Upgrade notes\n\n- Updated the catalog bundle.\n- This release is reachable through the declared upgrade graph." } ] }When Renovate selects
1.21.2, the existingchangelogContenthandling should embed that Markdown in the pull request and usechangelogUrlas its link.Scope
This deliberately does not add generic fetching from
changelogUrl, changesourceUrlhandling, or add a root-level response field. It only exposes the already-supported per-release content field through the custom datasource schema.This is useful for custom APIs that generate transition-specific release notes, including catalog/graph-based datasources where the datasource can explain why a proposed upgrade is valid.
I have a small implementation with a schema test and documentation update ready if this direction is accepted.
All reactions