refactor: simplify tree output formatting in gen_commit.py
This commit is contained in:
parent
7e83d68368
commit
daec359e6d
@ -193,20 +193,16 @@ def format_tree_output(project_path, base_name, base_diff, submodule_diffs, comm
|
||||
|
||||
|
||||
output = [f"📦 {base_name}"]
|
||||
output.append(f"└── 📝 {commit[project_path]}:")
|
||||
for line in base_diff.split("\n"):
|
||||
output.append(f" └── {line}")
|
||||
output.append(f" └── 📝 {commit[project_path]}:")
|
||||
output.append(f" └── 📦 {base_diff}")
|
||||
|
||||
if submodule_diffs:
|
||||
output.append("└── 📚 Submodules:")
|
||||
output.append(" └── 📚 Submodules:")
|
||||
for submodule_path, diff in submodule_diffs.items():
|
||||
name = os.path.basename(submodule_path)
|
||||
output.append(f" └── 📦 {name}")
|
||||
if submodule_path in commit:
|
||||
output.append(f" └── 📝 {commit[submodule_path]}:")
|
||||
|
||||
else:
|
||||
output.append(f" └── 📝 ✓")
|
||||
for line in diff.split("\n"):
|
||||
output.append(f" └── {line}")
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user