Skip to content

Commit

Permalink
Update .githooks/prepare-commit-msg.
Browse files Browse the repository at this point in the history
  • Loading branch information
gitauto-ai[bot] authored Oct 26, 2024
1 parent f7302a9 commit d42166c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .githooks/prepare-commit-msg
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ CURRENT_MESSAGE=$(cat "$COMMIT_MSG_FILE")
# Version 0.6.1 and higher: dotnet-aicommitmessage generate-message -m "$CURRENT_MESSAGE"
# Version 0.6.0 and lower: dotnet-aicommitmessage generate-message -m "$CURRENT_MESSAGE" -b "$GIT_BRANCH_NAME" -d "$GIT_DIFF"

if ! AI_MESSAGE=$(dotnet-aicommitmessage generate-message -m "$CURRENT_MESSAGE"); then
if ! AI_MESSAGE=$(dotnet-aicommitmessage generate-message -m "$CURRENT_MESSAGE" 2>/dev/null); then
echo "Error: Failed to generate AI commit message. Using original message." >&2
exit 0
fi
Expand Down

0 comments on commit d42166c

Please sign in to comment.