Extend changelog API to make it easier to determine the start of a changelog commit range
When creating changelogs using the API, the from
and to
arguments are used to specify the range of commits to use. Both arguments are currently required.
A very common case is to generate a changelog for a new version, and wanting to use the tag of the previous version as the start of the range. For example, when releasing GitLab 14.3 we want the start of the range to be the latest 14.2.x tag.
This logic already sort of exists in Release Tools, and is used for finding the next Helm chart version to use based on a GitLab version. We should port this over to GitLab, and use it in the changelog API. The setup would basically be this: when from
isn't specified, we assume the user wants to use the last tag of the previous version (according to semantic versioning). We then use that tag as the start of the range.