You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: git-commit-push-script.sh
+3-4Lines changed: 3 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -33,12 +33,11 @@ if [ -z "$COMMIT_MSG" ]; then
33
33
fi
34
34
35
35
# Clean up commit message formatting - remove #, ```, period . at the end of response
36
-
commit_message=$(echo $COMMIT_MSG| sed 's/#//g'| sed 's/```//g'| sed 's/Commit message title://g'| sed 's/Commit message summary://g'| sed 's/\.//g'| head -n 1)
36
+
commit_message=$(echo $COMMIT_MSG| sed 's/#//g'| sed 's/```//g'| sed 's/Commit message title://g'| sed 's/Commit message summary://g'| sed 's/\.//g')
37
37
38
-
# If the commit message is longer than 72 characters, truncate it at word boundary
38
+
# If the commit message is longer than 72 characters, truncate it
39
39
if [ ${#commit_message}-gt 72 ];then
40
-
# Truncate at the last word boundary before 72 characters
41
-
commit_message=$(echo "$commit_message"| cut -c 1-72 | sed 's/\s\+[^\s]*$//')
0 commit comments