diff options
| author | Bobby <[email protected]> | 2022-11-05 00:42:05 -0400 |
|---|---|---|
| committer | Bobby <[email protected]> | 2022-11-05 00:42:05 -0400 |
| commit | a8eda402d295c16bcaf786abbd3a020fe6234b26 (patch) | |
| tree | 3adb107457ae1483b0cc6c5747f1244d2c1ddda8 /commit.sh | |
| parent | 7298bf4535c1f9ca624997463c39c852549a63da (diff) | |
| download | texty-a8eda402d295c16bcaf786abbd3a020fe6234b26.tar.xz texty-a8eda402d295c16bcaf786abbd3a020fe6234b26.zip | |
feat:
Diffstat (limited to 'commit.sh')
| -rwxr-xr-x | commit.sh | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -116,9 +116,6 @@ then read -p "Enter commit message: " message fi -# Add type to the message -message="$type: $message" - # Check if the branch exists if [ -z "$(git branch --list $branch)" ] then @@ -136,6 +133,8 @@ fi # Check if type is valid if [[ $type =~ ^(feat|fix|docs|style|refactor|perf|test|chore|revert)$ ]] then + # Add type to the message + message="$type: $message" # If type is valid, run commit function commit $files $message $branch else @@ -143,6 +142,7 @@ else read -p "Invalid type. Do you want to use the default type "feat"? (y/n): " useDefaultType if [[ $useDefaultType =~ ^[Yy]$ ]] || [[ $useDefaultType =~ ^[Yy][Ee][Ss]$ ]] then + message="$type: $message" commit $files $message $branch else echo "Commit aborted" |
