Skip to content

Commit

Permalink
TEST-1234 feat: improve Gemini API commit message request This commit…
Browse files Browse the repository at this point in the history
… 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.
  • Loading branch information
wesleyscholl committed Sep 23, 2024
1 parent d5cf944 commit 21179be
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion git-commit-push-script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ diff=$(git diff --cached)
diff=$(echo $diff | sed 's/\\/\\\\/g' | sed 's/"/\\"/g' | sed 's/\n/\\n/g')

# Prepare the Gemini API request
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> "}]}]}'
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> "}]}]}'

# Get commit message from Gemini API
commit_message=$(curl -s \
Expand Down

0 comments on commit 21179be

Please sign in to comment.