Refactor for call consistency

This commit is contained in:
erik 2023-04-18 15:33:58 +02:00
parent 537a5836b9
commit 84d3e29c28

View file

@ -27,11 +27,13 @@ class PrepareReleaseService():
class TagAndPushReleaseService():
def __init__(self, git_api: GitApi):
def __init__(self, git_api: GitApi, release_repo: ReleaseRepository = None):
self.git_api = git_api
self.release_repo = release_repo
self.release = release_repo.get_release()
def tag_release(self, release: Release):
annotation = 'v' + release.version.get_version_string()
def tag_release(self):
annotation = 'v' + self.release.version.get_version_string()
message = 'Release ' + annotation
# TODO: Why is the count a parameter? We always tag the second last commit in this process.
self.git_api.tag_annotated(annotation, message, 1)