From 5dc83d287170a617611808b5ea6554dcd58986c9 Mon Sep 17 00:00:00 2001 From: ori Date: Wed, 11 Dec 2024 18:25:27 +0200 Subject: [PATCH] github pusher --- hasadna_k8s/github_pusher/cli.py | 4 ++++ hasadna_k8s/github_pusher/main.py | 1 + 2 files changed, 5 insertions(+) diff --git a/hasadna_k8s/github_pusher/cli.py b/hasadna_k8s/github_pusher/cli.py index dc73370b..c691dec0 100644 --- a/hasadna_k8s/github_pusher/cli.py +++ b/hasadna_k8s/github_pusher/cli.py @@ -15,10 +15,14 @@ def main(): def run(event_json, file, env): from . import main if file: + print(f'Reading event from file: {event_json}') with open(event_json) as f: event_json = f.read() elif env: + print(f'Reading event from env: {event_json}') event_json = os.environ[event_json] + else: + print('Reading event from argument') main.run(json.loads(event_json)) print("OK") diff --git a/hasadna_k8s/github_pusher/main.py b/hasadna_k8s/github_pusher/main.py index 2fa0742b..bb88c38f 100644 --- a/hasadna_k8s/github_pusher/main.py +++ b/hasadna_k8s/github_pusher/main.py @@ -122,6 +122,7 @@ def process(repository_name, repository_organization, ref, files, commit_context with open(GITHUB_PUSHER_CONFIG_YAML_PATH) as f: data = benedict(f.read(), format='yaml', keypath_separator=None) configs = [parse_config(config) for config in data['configs']] + print(f'process {repository_organization}/{repository_name} {ref} ({",".join(files)}) {commit_context}') if ref.startswith('refs/heads/') and files: branch = ref.replace('refs/heads/', '') for config in configs: