Update changelog logic is broken for pre releases
The current implementation for the update_changelog_logic
(feature flagged code) is broken for generating changelogs for prereleases.
This is the case because the extract_version
method (see https://gitlab.com/gitlab-org/gitlab/-/blob/1c862380cf58b5c4179b97ddeafd7d3636c71fa4/app/finders/repositories/changelog_tag_finder.rb#L45) is used for both, capturing the version parts for the new_version
, but also for the stable version.
Basically the update changelog logic will reject a prerelease as new version.
You can reproduce this on any project using a request like this:
curl --header "PRIVATE-TOKEN: $GITLAB_TOKEN" https://gitlab.com/api/v4/projects/<project-id>/repository/changelog --data 'version=1.0.0-rc1'
Edited by Timo Furrer