Skip to content

Commit 0fa412a

Browse files
committed
chore: add vscode recommendations; jira commit tagging
1 parent f0b84a6 commit 0fa412a

File tree

2 files changed

+29
-0
lines changed

2 files changed

+29
-0
lines changed

.husky/prepare-commit-msg

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#!/bin/sh
2+
#
3+
# git prepare-commit-msg hook for automatically prepending an issue key
4+
# from the start of the current branch name to commit messages.
5+
6+
# check if commit is merge commit or a commit ammend
7+
if [ $2 = "merge" ] || [ $2 = "commit" ]; then
8+
exit
9+
fi
10+
11+
ISSUE_KEY=`git branch | grep -o "\* \(.*/\)*CSS-[0-9]\+" | grep -o "CSS-[0-9]\+"`
12+
if [ $? -ne 0 ]; then
13+
# no issue key in branch, use the default message
14+
exit
15+
fi
16+
17+
# issue key matched from branch prefix, prepend to commit message
18+
TEMP=`mktemp /tmp/commitmsg-XXXXX`
19+
(echo "$(cat $1) [$ISSUE_KEY]") > $TEMP
20+
cat $TEMP > $1

.vscode/extensions.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"recommendations": [
3+
"gruntfuggly.todo-tree",
4+
"nrwl.angular-console",
5+
"esbenp.prettier-vscode",
6+
"vunguyentuan.vscode-postcss",
7+
"mariusschulz.yarn-lock-syntax"
8+
]
9+
}

0 commit comments

Comments
 (0)