Skip to content

Fix edge case when the version is a pre-release

What does this MR do and why?

Contributes to #452171 (closed)

Problem

Previous changes #441804 (closed) to Changelog API logic introduced a bug to the version detection.

Before we allowed to provide any valid semantic version as a version value. But now it rejects versions with pre-release identifier.

Solution

Fix the bug and permit versions with a pre-release as a version argument.

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Before After
Screenshot_2024-03-27_at_14.38.37 Screenshot_2024-03-27_at_14.38.01

How to set up and validate locally

  1. Enable feature flag update_changelog_logic: Feature.enable(:update_changelog_logic)
  2. Visit http://gdk.test:3000/api/v4/projects/3/repository/changelog?version=15.1.1-rc1
  3. It should return some data instead of an error message
Edited by Vasilii Iakliushin

Merge request reports