summaryrefslogtreecommitdiff
path: root/commit-msg
blob: 59779459a9f775da82fd93c993a1f79a94778304 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/bin/bash

# move this script to the .git/hooks directory for your repo.
# make sure to chmod +x .git/hooks/commit-msg

branch=`git rev-parse --abbrev-ref HEAD`

if [[ $branch == issues/* ]]; then
  link=$(echo $branch | awk -F/ '{ print "[endlessm/eos-sdk#"$2"]" }')
  echo "issue link: $link"
  echo $link >> $1
fi

exit 0