From cacf18e723282283cebea1b1d584551759a3a54e Mon Sep 17 00:00:00 2001 From: KaySar12 Date: Tue, 20 May 2025 16:44:34 +0700 Subject: [PATCH] feat: handle no changes scenario in commit generation script --- scripts/interpreter/gen_commit.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/interpreter/gen_commit.py b/scripts/interpreter/gen_commit.py index 7cd4eb8..a2012aa 100755 --- a/scripts/interpreter/gen_commit.py +++ b/scripts/interpreter/gen_commit.py @@ -45,6 +45,7 @@ Guidelines: - Do not include explanations—only output commit message in under 100 characters. - Use this git commit convention to get uncommitted changes: {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: {convention_content} - 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}") 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( "git",