瀏覽代碼

Do not run frontend tests upon git hooks (#1614)

* test

* tst

* front changes

* Changes pre-commit

* Changes pre-commit

* Changes pre-commit

* non fe change

* fe change

* Removes unnecessary variable

* Remvoes console.log

* Removes newline

* Remove formating by VSCode plugin
Damir Abdulganiev 3 年之前
父節點
當前提交
c3d44c95c2
共有 1 個文件被更改,包括 8 次插入1 次删除
  1. 8 1
      kafka-ui-react-app/.husky/pre-commit

+ 8 - 1
kafka-ui-react-app/.husky/pre-commit

@@ -1,4 +1,11 @@
 #!/bin/sh
 . "$(dirname "$0")/_/husky.sh"
 
-cd kafka-ui-react-app && npm run pre-commit
+
+if git diff --cached --name-only | grep --quiet "kafka-ui-react-app"
+then
+  cd kafka-ui-react-app && npm run pre-commit
+else 
+  echo "Skipping frontend tests"
+  exit 0
+fi