This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Get the current branch name | |
branch_name=$(git symbolic-ref --short HEAD) | |
# Extract the ticket number from the branch name using a regex | |
ticket_number=$(echo $branch_name | grep -o -E '[A-Za-z]+-[0-9]+') | |
# Check if a ticket number was found | |
if [ -n "$ticket_number" ]; then | |
# Read the original commit message from the provided file |