Skip to content

Commit 21179be

Browse files
committedSep 23, 2024··
TEST-1234 feat: improve Gemini API commit message request This commit refines the Gemini API request for generating commit messages by: - Clarifying the formatting expectations for the commit message title and summary. - Removing unnecessary backticks and markdown formatting from the request. - Improving the message structure for better clarity.
1 parent d5cf944 commit 21179be

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 (commit message title 72 character maximum and commit message summary 50 character maxiumum) for the following git diff: '"$diff"' The format should be as follows (without titles, back ticks, markdown fomatting): <commit message title> (2 new lines - /n /n) <commit message summary> "}]}]}'
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> "}]}]}'
2121

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

0 commit comments

Comments
 (0)
Please sign in to comment.