feat: handle no changes scenario in commit generation script

This commit is contained in:
KaySar12 2025-05-20 16:44:34 +07:00
parent d9396a176d
commit cacf18e723

View File

@ -45,6 +45,7 @@ Guidelines:
- Do not include explanationsonly output commit message in under 100 characters. - Do not include explanationsonly output commit message in under 100 characters.
- Use this git commit convention to get uncommitted changes: - Use this git commit convention to get uncommitted changes:
{git_commit_convention_content} {git_commit_convention_content}
- If there are no uncommitted changes, return "No changes"
- After getting uncommitted changes, analyze and generate a commit message Follow this convention: - After getting uncommitted changes, analyze and generate a commit message Follow this convention:
{convention_content} {convention_content}
- Commit Message should be in under 100 characters. - Commit Message should be in under 100 characters.
@ -141,6 +142,9 @@ async def commit_and_push_submodules():
print(f"Processing submodule: {name} at {abs_path}") print(f"Processing submodule: {name} at {abs_path}")
commit_msg = gen_commit(abs_path) commit_msg = gen_commit(abs_path)
if commit_msg == "No changes":
print(f"No changes for {name} at {abs_path}")
continue
proc = await asyncio.create_subprocess_exec( proc = await asyncio.create_subprocess_exec(
"git", "git",