diff --git a/src/component_updater.py b/src/component_updater.py index db87784..114bf6c 100644 --- a/src/component_updater.py +++ b/src/component_updater.py @@ -276,9 +276,9 @@ def __does_component_needs_to_be_updated(self, original_component: AtmosComponen relative_path = os.path.relpath(updated_file, updated_component.infra_repo_dir) original_file = os.path.join(original_component.infra_repo_dir, relative_path) + files_to_update.append(relative_path) if not os.path.isfile(original_file): logging.info(f"New file: {relative_path}") - files_to_update.append(relative_path) needs_update = True continue @@ -287,7 +287,6 @@ def __does_component_needs_to_be_updated(self, original_component: AtmosComponen if num_diffs < MAX_NUMBER_OF_DIFF_TO_SHOW: logging.info(f"diff: {self.__tools_manager.diff(original_file, updated_file)}") num_diffs += 1 - files_to_update.append(relative_path) needs_update = True for original_file in original_files: @@ -305,7 +304,6 @@ def __does_component_needs_to_be_updated(self, original_component: AtmosComponen logging.info(f"Component '{os.path.relpath(original_component.component_file, original_component.infra_repo_dir)}' needs to be updated") files_to_update.append(os.path.relpath(original_component.component_file, original_component.infra_repo_dir)) - return (needs_update, files_to_update, files_to_remove) def __create_branch_and_pr(self, repo_dir, files_to_update, files_to_remove, original_component: AtmosComponent, updated_component: AtmosComponent, branch_name: str) -> PullRequestCreationResponse: