From 4173539ba4c3eda70270e606ed8418e4168e57bc Mon Sep 17 00:00:00 2001 From: mike2ox Date: Thu, 16 Mar 2023 17:46:55 +0900 Subject: [PATCH 1/4] [Chore] delete husky in gitignore #758 --- .gitignore | 2 -- 1 file changed, 2 deletions(-) diff --git a/.gitignore b/.gitignore index 8bc864e20..032ae83d2 100644 --- a/.gitignore +++ b/.gitignore @@ -39,6 +39,4 @@ yarn-error.log* .history -.husky - .eslintcache From 73813429bd94838c013946e3ce39465b2e3db867 Mon Sep 17 00:00:00 2001 From: mike2ox Date: Thu, 16 Mar 2023 17:53:08 +0900 Subject: [PATCH 2/4] [Chore] update pre-commit hook #758 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - deploy 브랜치에 직접 커밋 못하도록 방지 --- .husky/pre-commit | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.husky/pre-commit b/.husky/pre-commit index 36af21989..7db26c7c5 100755 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -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 From f2e4dee94a435d100fc7f0872dcd463fb1f4d8e5 Mon Sep 17 00:00:00 2001 From: mike2ox Date: Thu, 16 Mar 2023 17:54:16 +0900 Subject: [PATCH 3/4] [Chore] update prepare-commit-msg hook #758 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 브랜치 이름에 이슈넘버가 있다면 자동으로 커밋 타이틀 마지막에 이슈 붙이기 --- .husky/prepare-commit-msg | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100755 .husky/prepare-commit-msg diff --git a/.husky/prepare-commit-msg b/.husky/prepare-commit-msg new file mode 100755 index 000000000..ea77f548d --- /dev/null +++ b/.husky/prepare-commit-msg @@ -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 \ No newline at end of file From 5b2cd3e2acb4c977e7463bd7f64b5235021b63b6 Mon Sep 17 00:00:00 2001 From: mike2ox Date: Thu, 16 Mar 2023 18:07:58 +0900 Subject: [PATCH 4/4] [Chore] deactivate codeowner #758 --- .github/CODEOWNERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 8afe0dd58..4b721c86b 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1,3 +1,3 @@ # 모든 PR의 리뷰어로 해당 팀 멤버들을 설정 -* @42organization/fe_2nd +# * @42organization/fe_2nd