Skip to content

Commit

Permalink
Test PR creation
Browse files Browse the repository at this point in the history
  • Loading branch information
goruha committed Dec 6, 2024
1 parent e6e06d6 commit 3e97dc5
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/component_updater.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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:
Expand All @@ -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:
Expand Down

0 comments on commit 3e97dc5

Please sign in to comment.