Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 31 additions & 1 deletion .husky/pre-push
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,34 @@ if (process.versions.bun !== expectedBunVersion) {
console.warn(`Warning: Bun version ${process.versions.bun} differs from expected ${expectedBunVersion}`);
}
'
bun typecheck

# kilocode_change start
jetbrains=0
zero=0000000000000000000000000000000000000000

while read -r local_ref local_oid remote_ref remote_oid; do
if [ "$local_oid" = "$zero" ]; then
continue
fi

base="$remote_oid"
if [ "$remote_oid" = "$zero" ]; then
base=$(git merge-base "$local_oid" "$1/main" 2>/dev/null || git hash-object -t tree /dev/null)
fi

if ! git diff --quiet "$base" "$local_oid" -- . \
':(exclude).changeset/**' \
':(exclude)packages/kilo-vscode/**' \
':(exclude)packages/kilo-docs/**'; then
jetbrains=1
fi
done

bun typecheck --filter='!@kilocode/kilo-jetbrains'

if [ "$jetbrains" -eq 1 ]; then
bun typecheck --filter='@kilocode/kilo-jetbrains'
else
echo "Skipping JetBrains typecheck (no relevant changes)"
fi
# kilocode_change end
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ Agent limitations, local resource constraints, OOM constraints, or an agent prom

## Git Hooks

This project uses [Husky](https://typicode.github.io/husky/) to manage Git hooks. The current pre-push hook checks the Bun version against root `package.json` and runs the repo-level typecheck.
This project uses [Husky](https://typicode.github.io/husky/) to manage Git hooks. The current pre-push hook checks the Bun version against root `package.json` and runs the repo-level typecheck. The JetBrains typecheck runs only when the pushed changes can affect the JetBrains plugin, so VS Code-only, docs-only, and changeset-only pushes do not require Java.

## Troubleshooting

Expand Down
Loading