Lefthook support

AI-generated summary

The discussion revolves around Lefthook, a Git hooks manager written in Go. Arkweid, the author of Lefthook, announced that it has been merged into the dev environment and offered to help with any questions or issues.

Akweid explained that Lefthook allows users to run script files and can be integrated with crystalball to run rspec tests only for changed code. This integration can significantly reduce the time spent waiting for rspec tests to run. A guide on using Lefthook + Crystalball is available.

Falco shared their positive experience with Lefthook, highlighting the ease of setup and use. The discussion also includes a link to the related pull request on GitHub: https://github.com/discourse/discourse/pull/7826.

Hello, guys. Lefthook was merged in dev environment. I’m author so that I can help with any question about it. If anyone faced with issues or wants a feature, let me know :slight_smile:

Welcome, @Arkweid! Can you say more about what Lefthook is and why we’d want to know more about it? Maybe a link to it and a use case?

I used it for the first time today, and it’s great that I had to do zero setup in my machine for it.

Thanks for the pull request!

There is context here:

https://github.com/discourse/discourse/pull/7826

Here is a repo.
Lefthook is a Git hooks manager. It written in Go, so it just a single binary without dependencies and you can use it in any type of project(Rust, Erlang, Java anything you want).

Addtional features you may be interested in Discourse context:
Run script files - Lefthook can run not only oneline commands. Here example how to check commit header and decline it if pattern not matched. No fix bug commits anymore! :slight_smile:
Integrate with crystalball - it always nice to run rspec tests only for changed code. It easy with Lefthook.

Guide about have to use Lefthook + Crystallball.
If someone are tired of waiting rspec for 10 minutes and want to run actual tests for changed code :slight_smile: