commit | 9d97ababc34f330f885f2548741544c9b16e724b | [log] [tgz] |
---|---|---|
author | Robert Munteanu <rombert@apache.org> | Mon Dec 18 23:20:12 2017 +0200 |
committer | Robert Munteanu <rombert@apache.org> | Mon Dec 18 23:20:12 2017 +0200 |
tree | 7203a7e0a6e4dec690504a9cd71f821df224ad67 | |
parent | a156809e561b2081726e107d0d1fabe8c3e76eaa [diff] |
Add utility script for generating jira links to commits
diff --git a/scripts/jira_link_for_commit.sh b/scripts/jira_link_for_commit.sh new file mode 100755 index 0000000..f524463 --- /dev/null +++ b/scripts/jira_link_for_commit.sh
@@ -0,0 +1,12 @@ +#!/bin/sh -e + +if [ $# -eq 0 ]; then + commit=HEAD +else + commit=$1 +fi +hash=$(git rev-parse --short ${commit}) +base=$(git remote get-url origin) +url=${base%.git}/commit/${hash} + +echo "[commit ${hash}|${url}]"