Container Changelogs
Feature Request Checklist
- I checked existing issues and discussions for duplicates.
- This is a feature request, not a support question.
Problem Description
I was checking through the notification template docs to customize my ntfy output (primarily to reduce noise from fresh containers). One of my goals was to add in a link to the changelog for any updated containers so I could quickly see what new features were available, but this would require a bit of string parsing, since image names can vary widely (ollama/ollama:latest, ghcr.io/developer/container:tag, postgresql:16, etc). These resultant URLs are also not guaranteed to be accurate for the same reason, since there are also private container registries to contend with.
Desired Solution
To satisfy this user story, I propose one of two changes.
The first, import sprig for template functions, which would permit hacky string manipulation with splitn on the image name.
The second would be to create a logrus data point during container scraping for either the container registry URL or the origin repository release page (or both), so that these tags can be used in notification templates. There is already a func to turn a container image name into a manifest URL, since watchtower must reach out to this anyway, so turning that into a registry page is possibly not too far of a stretch. This is less useful than the actual repository URL, though, since the container registry may not have changelogs on it.
Current Alternatives or Workarounds
Presently I'm copying and pasting the image name along with "changelog" into a web search, which is not so great while on the go. The sprig library for go would permit use of the splitn function in templates to split a string at a given character, which I did attempt, but vanilla golang templates do not have this functionality.
Additional Context
No response
Source: nicholas-fedor/watchtower