docs: improve pre-commit docs and discoverability when CI fails (#29970)

This commit is contained in:
Maxime Beauchemin
2024-08-20 12:38:50 -07:00
committed by GitHub
parent cf083bf827
commit 175ba78d32
2 changed files with 50 additions and 4 deletions

View File

@@ -40,8 +40,11 @@ jobs:
brew install norwoodj/tap/helm-docs
- name: pre-commit
run: |
if ! pre-commit run --all-files; then
git status
git diff
set +e # Don't exit immediately on failure
pre-commit run --all-files
if [ $? -ne 0 ] || ! git diff --quiet --exit-code; then
echo "❌ Pre-commit check failed."
echo "🚒 To prevent/address this CI issue, please install/use pre-commit locally."
echo "📖 More details here: https://superset.apache.org/docs/contributing/development#git-hooks"
exit 1
fi