From ed4747add94cf41a799312e231f26f487e911e8b Mon Sep 17 00:00:00 2001 From: Paul Hebble Date: Wed, 27 Nov 2024 10:42:45 -0600 Subject: [PATCH] Skip install step when metadata is unchanged --- ckan_meta_tester/ckan_meta_tester.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ckan_meta_tester/ckan_meta_tester.py b/ckan_meta_tester/ckan_meta_tester.py index 11ad576..5d02c1d 100644 --- a/ckan_meta_tester/ckan_meta_tester.py +++ b/ckan_meta_tester/ckan_meta_tester.py @@ -189,6 +189,10 @@ def install_ckan(self, file: Path, orig_file: Path, pr_body: Optional[str], meta if meta_repo is not None: diff = ckan.find_diff(meta_repo) if diff is not None: + if len(diff) == 0: + print(f'::notice file={orig_file}::Diff empty for {ckan.name} {ckan.version}, skipping install', + flush=True) + return True with LogGroup(f'Diffing {ckan.name} {ckan.version}'): print(diff, end='', flush=True) with LogGroup(f'Installing {ckan.name} {ckan.version}'):