7 lines
190 B
Bash
Executable File
7 lines
190 B
Bash
Executable File
#!/bin/bash
|
|
commit_subject=$(git log -1 --pretty=format:%s)
|
|
|
|
regex='Merge pull request #[0-9]+ from .+/(.+)$'
|
|
[[ $commit_subject =~ $regex ]]
|
|
branch_name=${BASH_REMATCH[1]}
|
|
echo $branch_name |