Changelog API: fix pattern for header detection

What does this MR do and why?

Problem

We use a regular expression to detect if the release is already mentioned in CHANGELOG.md. But it errorneously matches pre-releases like 1.0.0-rc1 and prevents a creation of release 1.0.0.

Solution

Modify the regular expression to match exact releases.

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.

How to set up and validate locally

  1. Create a changelog for version 1.0.0-rc1 (see API documentation).
  2. It should create a new commit that adds ## 1.0.0-rc1 ... to the CHANGELOG.md
  3. Try to create a changelog for version 1.0.0 after that
  4. It should create a new commit that adds ## 1.0.0 ... to the CHANGELOG.md (before the fix, it won't create any commits)
Edited by Vasilii Iakliushin

Merge request reports

Loading