feat: fix script utils - closes #9 (#10)

Signed-off-by: Arthurim <arthurbdauphine@gmail.com>

Signed-off-by: Arthurim <arthurbdauphine@gmail.com>
This commit is contained in:
Eru Ilúvatar 2022-12-20 15:04:57 +00:00 committed by GitHub
parent b078bc69d0
commit 919f34db7e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -4,8 +4,8 @@
branch=$(git branch | sed -n -e 's/^\* \(.*\)/\1/p')
branch="${branch##*feat/}"
branch="${branch//\_/ }"
issue_number="${branch//Issue\-/}"
issue_number="${branch//issue\-/}"
title=$( cut -d ' ' -f 2- <<< "$issue_number" )
issue_number=$( cut -d ' ' -f 1 <<< "$issue_number" )
commit_message="feat: $title Closes #$issue_number"
commit_message="feat: $title - closes #$issue_number"
git commit -sam "$commit_message"