diff --git a/code/app.py b/code/app.py index c4e9a43..8b3829a 100644 --- a/code/app.py +++ b/code/app.py @@ -44,7 +44,7 @@ def handle_event(request: GiteaRequest): # extract information commit_msg = request.head_commit['message'] repo_url = request.repository['clone_url'] - branch_name = request.ref.split('/')[-1] + # branch_name = request.ref.split('/')[-1] # stop early if asked if commit_msg.lower().startswith('[skip ci]'): raise HTTPException( @@ -63,7 +63,6 @@ def handle_event(request: GiteaRequest): # execute runner script logging.info('rexecuting runner script') execute_runner_script(path=runner_script_path) - # # TODO: create virtualenv? # # install requirements # assert pipeline.requirements is not None diff --git a/code/runner_script.py b/code/runner_script.py index 7b1642e..2982112 100644 --- a/code/runner_script.py +++ b/code/runner_script.py @@ -15,7 +15,12 @@ class RunnerScript(BaseModel): content_dict = yaml.safe_load(fh) script_list = content_dict['script'].split('\n') logging.debug('finished') - return RunnerScript.model_validate({'script': script_list}) # type: ignore + rs = RunnerScript.model_validate( # type: ignore + { + 'script': script_list + } + ) + return rs if __name__ == '__main__': diff --git a/code/setup_logging.py b/code/setup_logging.py index 03af383..061740e 100644 --- a/code/setup_logging.py +++ b/code/setup_logging.py @@ -2,7 +2,6 @@ from dotenv import load_dotenv import logging from configparser import ConfigParser from pathlib import Path -from typing import Literal # load default values