scripts: ci: test_plan: use find_modules only when commits are provided

Current implementation will not work if comits were not provided.
ie. use case with list of changed files will fail as args.commits is None.

Signed-off-by: Piotr Kosycarz <piotr.kosycarz@nordicsemi.no>
This commit is contained in:
Piotr Kosycarz 2024-07-16 11:25:06 +02:00 committed by Anas Nashif
commit b8ae3a416b

View file

@ -149,7 +149,7 @@ class Filters:
os.remove(fname)
def find_modules(self):
if 'west.yml' in self.modified_files:
if 'west.yml' in self.modified_files and args.commits is not None:
print(f"Manifest file 'west.yml' changed")
print("=========")
old_manifest_content = repo_to_scan.git.show(f"{args.commits[:-2]}:west.yml")