dd todos from review

main
erik 1 year ago
parent d5d8b8e7e1
commit 81458c6acc

@ -22,13 +22,13 @@ def add_versions(config, release_version, bump_version) -> dict:
class ReleaseMixin(DevopsBuild):
def __init__(self, project, config):
def __init__(self, project, config): # todo: create services in init, dont expose repos etc in api
super().__init__(project, config)
release_mixin_config = config['ReleaseMixin']
self.config_file = release_mixin_config['config_file']
self.main_branch = release_mixin_config['main_branch']
self.git_api = GitApi()
self.release_type_repo = ReleaseTypeRepository(self.git_api)
self.release_type_repo = ReleaseTypeRepository(self.git_api) # maybe get from env?
self.version_repo = VersionRepository(self.config_file)
self.release_repo = ReleaseRepository(self.version_repo, self.release_type_repo, self.main_branch)

@ -17,5 +17,4 @@ sys.path.append(parent)
# now we can import the module in the parent
# directory.
from infrastructure_api import GitApi
from infrastructure_api import GitApi # todo: implement from services example

@ -25,7 +25,7 @@ from infrastructure_api import GitApi
def change_test_dir( tmp_path: Path, monkeypatch: pt.MonkeyPatch):
monkeypatch.chdir(tmp_path)
def test_prepare_release_service(tmp_path: Path, monkeypatch: pt.MonkeyPatch):
def test_prepare_release_service(tmp_path: Path, monkeypatch: pt.MonkeyPatch): # todo: maybe use mocks for service api tests
# init
file_name = 'config.json'
with open(f'test/resources/{file_name}', 'r') as json_file:

Loading…
Cancel
Save