Skip to content

Commit 43b6821

Browse files
committed
TEST-1234 feat: Remove unnecessary newlines from commit message request This commit removes the unnecessary newlines from the commit message request sent to the Gemini API. The newlines were causing the generated commit message to include extra empty lines, making it less readable. This change ensures that the generated commit message is clean and concise.
1 parent 21179be commit 43b6821

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

git-commit-push-script.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ diff=$(git diff --cached)
1717
diff=$(echo $diff | sed 's/\\/\\\\/g' | sed 's/"/\\"/g' | sed 's/\n/\\n/g')
1818

1919
# Prepare the Gemini API request
20-
gemini_request='{"contents":[{"parts":[{"text": "Write a git commit message for the following git diff: '"$diff"' The format should be as follows: <commit message title - 72 character max> (2 new lines - /n /n) <commit message summary - 50 character max> "}]}]}'
20+
gemini_request='{"contents":[{"parts":[{"text": "Write a git commit message for the following git diff: '"$diff"' The format should be as follows: <commit message title - 72 character max>"}]}]}'
2121

2222
# Get commit message from Gemini API
2323
commit_message=$(curl -s \

0 commit comments

Comments
 (0)