kiwiproject / kiwiproject-changelog

Generates change logs
MIT License
1 stars 0 forks source link

When creating a GitHub release, verify it does not exist #172

Closed sleberknight closed 1 month ago

sleberknight commented 2 months ago

Update GitHubReleaseManager#createRelease so that it:

If a release already exists, then throw an IllegalStateException with a descriptive message like:

A release with title 'v0.10.0' already exists!
See it at https://github.com/kiwiproject/kiwiproject-changelog/releases/tag/v0.10.0

This way we don't create another release with the same title. GitHub prevents you from creating multiple releases for the same tag, but it lets you create releases having the same title if they are associated with different tags. We don't want this to happen, and I'm not sure why GitHub even allows duplicate release titles, but they do so we need to handle it.