From 91ec9edc24a44d47f90ad6a1b0a9f062258933b8 Mon Sep 17 00:00:00 2001 From: KevinDeJong-TomTom <62094856+KevinDeJong-TomTom@users.noreply.github.com> Date: Tue, 17 May 2022 16:11:29 +0200 Subject: [PATCH] fix: GitHub releases and tags are now consistent (#5) --- CHANGELOG.md | 4 ++++ changelogmanager/github.py | 6 +++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3fe970a..d618118 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] ### Changed +- GitHub Releases and associated tags are now both prefixed with `v` (i.e. `v1.0.0` iso `1.0.0`) + +## [1.0.1] - 2022-05-04 +### Changed - Updated README.md to be compatible with PyPi ## [1.0.0] - 2022-05-04 diff --git a/changelogmanager/github.py b/changelogmanager/github.py index a136e96..9e8107c 100644 --- a/changelogmanager/github.py +++ b/changelogmanager/github.py @@ -140,13 +140,13 @@ def generate_release_notes(release: Mapping): ) return body - version = changelog.suggest_future_version() + version = f"v{changelog.suggest_future_version()}" self.__github_request( method=HttpMethods.POST, api="releases", data={ - "tag_name": str(version), - "name": f"Release v{version}", + "tag_name": version, + "name": f"Release {version}", "draft": draft, "body": generate_release_notes(changelog.get(UNRELEASED_ENTRY)), },