fix: commit master hla nanes
This commit is contained in:
+5
-3
@@ -1,5 +1,4 @@
|
||||
import logging
|
||||
from pathlib import Path
|
||||
|
||||
import git
|
||||
|
||||
@@ -11,14 +10,17 @@ def git_push_changes(
|
||||
branch_name: str,
|
||||
service_dir_rel_path: str,
|
||||
registry_file_rel_path: str,
|
||||
master_hla_names_rel_path: str,
|
||||
commit_msg: str,
|
||||
):
|
||||
"""
|
||||
Push newly created service to Gitea
|
||||
"""
|
||||
try:
|
||||
logger.info(f"Staging files inside: {service_dir_rel_path} and {registry_file_rel_path}...")
|
||||
repo.index.add([service_dir_rel_path, registry_file_rel_path])
|
||||
logger.info(
|
||||
f"Staging files inside: {service_dir_rel_path}, {registry_file_rel_path}, {master_hla_names_rel_path}..."
|
||||
)
|
||||
repo.index.add([service_dir_rel_path, registry_file_rel_path, master_hla_names_rel_path])
|
||||
|
||||
# Check if there are changes to avoid empty commit crashes
|
||||
if not repo.is_dirty(index=True, working_tree=False):
|
||||
|
||||
@@ -99,4 +99,4 @@ class MasterHLANames(BaseModel):
|
||||
|
||||
def write_to_config(self) -> None:
|
||||
with open(self.config_path, "w") as f:
|
||||
yaml.safe_dump(self.model_dump(), f, indent=2)
|
||||
yaml.safe_dump(self.model_dump(), f, indent=4)
|
||||
|
||||
Reference in New Issue
Block a user