Update GitHubReleaseManager#createRelease so that it:
checks whether a release already exists for the tag (revision), or
if a release exists having the same title but for a different tag.
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.
Update
GitHubReleaseManager#createRelease
so that it:If a release already exists, then throw an
IllegalStateException
with a descriptive message like: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.