Symplify: [ChangelogLinker] Creates multiple Unreleased sections

Created on 15 Jul 2020  路  6Comments  路  Source: symplify/symplify

Most helpful comment

Ok, I will try.

All 6 comments

It was not used on CI yet, just before release.

But I think it should be smart enough to append new issues to Unreleased section instead of creating a new one.

Looks like the could is currently not built for that. It searches for the placeholder and puts just in there.

Maybe an solution could be to add a placeholder per version and try to add it here first, when it fails add a new section

It could look for \n## Unreleased?

@TomasVotruba could you give me information how to reproduce it? Thank you.

I think this method needs to be covered with test:
https://github.com/symplify/symplify/blob/ad443e522d7532328eceb2a13ee39ba0a4ba5a66/packages/changelog-linker/src/FileSystem/ChangelogFileSystem.php#L67

Where:

  • $newContent contains ## Unreleased
  • existing content contains ## Unreleased
  • and testg merging them together

When I look at the ChangelogFileSystem code, it will require some refactoring for better testing. It's very badly written.

Ok, I will try.

Was this page helpful?
0 / 5 - 0 ratings