Skip to content

The fastest browser for AI agents to run browser automation, built for sharing your logged-in browser state with your AI agents, like Codex or Claude Code, without disturbing you. Zero cost, zero config.

ci(lefthook): reject commits when the branch is behind origin/dev

0x02fb8a6f69917
diff --git a/lefthook.yml b/lefthook.yml
index a516b41..2048f69 100644
--- a/lefthook.yml
+++ b/lefthook.yml
@@ -12,6 +12,15 @@
pre-commit:
parallel: false
commands:
+ branch-up-to-date:
+ run: |
+ git fetch --quiet origin dev 2>/dev/null || { echo "⚠ skip branch-freshness check: cannot fetch origin/dev (offline?)"; exit 0; }
+ if git merge-base --is-ancestor FETCH_HEAD HEAD; then
+ exit 0
+ fi
+ echo "✗ Your branch is behind origin/dev — sync before committing:"
+ echo " git fetch origin dev && git rebase origin/dev # or: git merge origin/dev"
+ exit 1
style-check:
run: |
files=$(git diff --cached --name-only --diff-filter=ACMR | grep -E '^package/ego-browser/.*\.(ts|mjs|js|json|md)$' || true)