-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #759 from 42organization/Feat/update-development-s…
…etup-#758 Feat/update development setup #758
- Loading branch information
Showing
4 changed files
with
24 additions
and
3 deletions.
There are no files selected for viewing
Validating CODEOWNERS rules …
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
# 모든 PR의 리뷰어로 해당 팀 멤버들을 설정 | ||
|
||
* @42organization/fe_2nd | ||
# * @42organization/fe_2nd |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -39,6 +39,4 @@ yarn-error.log* | |
|
||
.history | ||
|
||
.husky | ||
|
||
.eslintcache |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,9 @@ | ||
#!/bin/sh | ||
. "$(dirname "$0")/_/husky.sh" | ||
|
||
if [ $(git rev-parse --abbrev-ref HEAD) = 'deploy' ]; then | ||
echo 'You cannot commit directly to the deploy branch' | ||
exit 1 | ||
fi | ||
|
||
npx lint-staged |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#!/bin/bash | ||
branch_name=$(git symbolic-ref --short HEAD) | ||
|
||
commit_msg_title=$(head -n 1 $1) | ||
commit_msg_body=$(tail -n +2 $1) | ||
issue_number=$(echo $branch_name | sed -n 's/^.*#\([0-9]*\)$/\1/p') | ||
issue_number_in_msg=$(grep -c "\#$issue_number" $1) | ||
|
||
if [[ -n $issue_number ]] && [[ ! $issue_number_in_msg -ge 1 ]]; then | ||
# echo "$commit_msg #$issue_number" > $1 | ||
echo "$commit_msg_title #$issue_number" > $1 | ||
if [[ -n $commit_msg_body ]]; then | ||
echo "$commit_msg_body" >> $1 | ||
fi | ||
else | ||
echo "check issue number in branch name" | ||
exit 1 | ||
fi |