[GH-ISSUE #8997] Remove Lefthook #28575

Open
opened 2026-04-17 20:01:19 -05:00 by GiteaMirror · 9 comments
Owner

Originally created by @dvanmali on GitHub (Apr 6, 2026).
Original GitHub issue: https://github.com/better-auth/better-auth/issues/8997

Originally assigned to: @gustavovalverde on GitHub.

Remove git hooks logic from repo. Additionally, the hooks are slow and cause each commit process to add ~30s per commit message, prevents commands like rebase from working, prevents commit messages in some cases via commit -m.

Argument is discussed in #1103 and #4994

Originally created by @dvanmali on GitHub (Apr 6, 2026). Original GitHub issue: https://github.com/better-auth/better-auth/issues/8997 Originally assigned to: @gustavovalverde on GitHub. Remove git hooks logic from repo. Additionally, the hooks are slow and cause each commit process to add ~30s per commit message, prevents commands like `rebase` from working, prevents commit messages in some cases via `commit -m`. Argument is discussed in [#1103](https://github.com/wakujs/waku/pull/1103#issuecomment-2564544165) and [#4994](https://github.com/better-auth/better-auth/pull/4994)
GiteaMirror added the needs: reproc-devops labels 2026-04-17 20:01:19 -05:00
Author
Owner

@dvanmali commented on GitHub (Apr 6, 2026):

cc @gustavovalverde #8888

<!-- gh-comment-id:4193675755 --> @dvanmali commented on GitHub (Apr 6, 2026): cc @gustavovalverde #8888
Author
Owner

@bytaesu commented on GitHub (Apr 6, 2026):

https://github.com/better-auth/better-auth/pull/8874

I agree on this point as well.

When I first added lefthook, the goal was to run Biome lightly and avoid running format and lint commands on every AI-driven iteration.

Right now, pre-commit is too heavy. Any checks that require a build should run in CI.

Also, the spell checker runs across the entire local workspace, which makes it inconvenient to manage files that aren’t tracked by Git.

If we’re going to keep this, it needs to stay as lightweight as possible.

<!-- gh-comment-id:4195481463 --> @bytaesu commented on GitHub (Apr 6, 2026): https://github.com/better-auth/better-auth/pull/8874 I agree on this point as well. When I first added lefthook, the goal was to run Biome lightly and avoid running format and lint commands on every AI-driven iteration. Right now, pre-commit is too heavy. Any checks that require a build should run in CI. Also, the spell checker runs across the entire local workspace, which makes it inconvenient to manage files that aren’t tracked by Git. If we’re going to keep this, it needs to stay as lightweight as possible.
Author
Owner

@bytaesu commented on GitHub (Apr 6, 2026):

When I first added lefthook, the goal was to run Biome lightly and avoid running format and lint commands on every AI-driven iteration.

Hi @dvanmali 👋😁

What do you think here?

<!-- gh-comment-id:4195494854 --> @bytaesu commented on GitHub (Apr 6, 2026): > When I first added lefthook, the goal was to run Biome lightly and avoid running format and lint commands on every AI-driven iteration. Hi @dvanmali 👋😁 What do you think here?
Author
Owner

@dvanmali commented on GitHub (Apr 6, 2026):

I think it's best to allow the user to write their own pre-commit flow in their personal workspace. Builds should catch all the failures.

<!-- gh-comment-id:4195531112 --> @dvanmali commented on GitHub (Apr 6, 2026): I think it's best to allow the user to write their own pre-commit flow in their personal workspace. Builds should catch all the failures.
Author
Owner

@MuzzaiyyanHussain commented on GitHub (Apr 7, 2026):

Hi,
I’d like to work on this issue. Planning to remove Lefthook and clean up related configs, while ensuring CI handles necessary checks. Please let me know if that works.

<!-- gh-comment-id:4197198499 --> @MuzzaiyyanHussain commented on GitHub (Apr 7, 2026): Hi, I’d like to work on this issue. Planning to remove Lefthook and clean up related configs, while ensuring CI handles necessary checks. Please let me know if that works.
Author
Owner

@bytaesu commented on GitHub (Apr 7, 2026):

Hi, I’d like to work on this issue. Planning to remove Lefthook and clean up related configs, while ensuring CI handles necessary checks. Please let me know if that works.

Yeah, once you open a PR, I'll check if anything else is needed.
Feel free to go ahead!! Thank you @MuzzaiyyanHussain 😁

<!-- gh-comment-id:4198368673 --> @bytaesu commented on GitHub (Apr 7, 2026): > Hi, I’d like to work on this issue. Planning to remove Lefthook and clean up related configs, while ensuring CI handles necessary checks. Please let me know if that works. Yeah, once you open a PR, I'll check if anything else is needed. Feel free to go ahead!! Thank you @MuzzaiyyanHussain 😁
Author
Owner

@gustavovalverde commented on GitHub (Apr 7, 2026):

Sorry @MuzzaiyyanHussain for closing the PR you recently created (mainly because this creates triage burden based on issues that might still require more analysis). As I introduced these changes, I'll analyze this to understand if there's a different approach based on the arguments @dvanmali already shared. If the decision is removing the configurations, then I'll reopen it.

Sorry for the miscommunication. After analyzing this, I'll comment here again.

<!-- gh-comment-id:4198663089 --> @gustavovalverde commented on GitHub (Apr 7, 2026): Sorry @MuzzaiyyanHussain for closing the PR you recently created (mainly because this creates triage burden based on issues that might still require more analysis). As I introduced these changes, I'll analyze this to understand if there's a different approach based on the arguments @dvanmali already shared. If the decision is removing the configurations, then I'll reopen it. Sorry for the miscommunication. After analyzing this, I'll comment here again.
Author
Owner

@MuzzaiyyanHussain commented on GitHub (Apr 7, 2026):

No worries at all, thanks for the clarification and for taking the time to look into this further.

<!-- gh-comment-id:4198801435 --> @MuzzaiyyanHussain commented on GitHub (Apr 7, 2026): No worries at all, thanks for the clarification and for taking the time to look into this further.
Author
Owner

@gustavovalverde commented on GitHub (Apr 8, 2026):

@dvanmali can you test with these configurations? https://github.com/better-auth/better-auth/pull/9044 this also allows you to override on your environment and adjust to your needs

Also, for some edge cases you can also use git commit --no-verify to fully bypass it.

<!-- gh-comment-id:4209635425 --> @gustavovalverde commented on GitHub (Apr 8, 2026): @dvanmali can you test with these configurations? https://github.com/better-auth/better-auth/pull/9044 this also allows you to override on your environment and adjust to your needs Also, for some edge cases you can also use `git commit --no-verify` to fully bypass it.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#28575