chore: update ui service manager of new service

This commit is contained in:
Benjamin Labrecque
2026-07-09 14:42:09 +02:00
parent 9081d3ef51
commit 3f7f392de0
+16 -12
View File
@@ -26,15 +26,14 @@ def git_push_changes(
f"{master_ioc_subs_rel_path}..."
f"{iocs_overview_rel_path}..."
)
repo.index.add(
[
service_dir_rel_path,
registry_file_rel_path,
master_hla_names_rel_path,
master_ioc_subs_rel_path,
iocs_overview_rel_path,
]
)
files_to_stage = [
service_dir_rel_path,
registry_file_rel_path,
master_hla_names_rel_path,
master_ioc_subs_rel_path,
iocs_overview_rel_path,
]
repo.index.add(files_to_stage)
# Check if there are changes to avoid empty commit crashes
if not repo.is_dirty(index=True, working_tree=False):
@@ -44,9 +43,14 @@ def git_push_changes(
logger.info("Committing changes...")
repo.index.commit(commit_msg)
logger.info(f"Pushing branch '{branch_name}' to origin...")
origin = repo.remote(name="origin")
origin.push(refspec=f"{branch_name}:{branch_name}").raise_if_error()
try:
logger.info(f"Pushing branch '{branch_name}' to origin...")
origin = repo.remote(name="origin")
origin.push(refspec=f"{branch_name}:{branch_name}").raise_if_error()
except Exception as e:
logger.info("Git resetting files")
repo.index.reset(files_to_stage)
raise e
logger.info("Successfully pushed!")