flake8 compliant
This commit is contained in:
+1
-2
@@ -44,7 +44,7 @@ def handle_event(request: GiteaRequest):
|
|||||||
# extract information
|
# extract information
|
||||||
commit_msg = request.head_commit['message']
|
commit_msg = request.head_commit['message']
|
||||||
repo_url = request.repository['clone_url']
|
repo_url = request.repository['clone_url']
|
||||||
branch_name = request.ref.split('/')[-1]
|
# branch_name = request.ref.split('/')[-1]
|
||||||
# stop early if asked
|
# stop early if asked
|
||||||
if commit_msg.lower().startswith('[skip ci]'):
|
if commit_msg.lower().startswith('[skip ci]'):
|
||||||
raise HTTPException(
|
raise HTTPException(
|
||||||
@@ -63,7 +63,6 @@ def handle_event(request: GiteaRequest):
|
|||||||
# execute runner script
|
# execute runner script
|
||||||
logging.info('rexecuting runner script')
|
logging.info('rexecuting runner script')
|
||||||
execute_runner_script(path=runner_script_path)
|
execute_runner_script(path=runner_script_path)
|
||||||
|
|
||||||
# # TODO: create virtualenv?
|
# # TODO: create virtualenv?
|
||||||
# # install requirements
|
# # install requirements
|
||||||
# assert pipeline.requirements is not None
|
# assert pipeline.requirements is not None
|
||||||
|
|||||||
@@ -15,7 +15,12 @@ class RunnerScript(BaseModel):
|
|||||||
content_dict = yaml.safe_load(fh)
|
content_dict = yaml.safe_load(fh)
|
||||||
script_list = content_dict['script'].split('\n')
|
script_list = content_dict['script'].split('\n')
|
||||||
logging.debug('finished')
|
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__':
|
if __name__ == '__main__':
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ from dotenv import load_dotenv
|
|||||||
import logging
|
import logging
|
||||||
from configparser import ConfigParser
|
from configparser import ConfigParser
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from typing import Literal
|
|
||||||
|
|
||||||
|
|
||||||
# load default values
|
# load default values
|
||||||
|
|||||||
Reference in New Issue
Block a user