qgadrian

qgadrian

Git hooks - Add git hooks to Elixir projects

Hey guys, I just wanted to share a library that was being around for a while already, but I didn’t share properly until now so it can help more people :vulcan_salute:

It’s called git_hooks and the main features are:

  • Git hooks actions are configured in your project
  • Auto install the configured hooks (configurable)
  • The actions can be system commands or a script in your project

Any feedback or PRs are highly appreciated :heart:

Thank you and stay safe out there!

Most Liked

qgadrian

qgadrian

Hey @r-c!

Is this supposed to occur upon compilation?

Correct! (here it is where in the code).

It’s weird, I just tested it myself in a new project and it worked fine :confused: Since the auto-install will run every time the dependency is compiled, could it be possible that it was already compiled in your case?

Sorry for the late response mate :folded_hands:

Mukulch15

Mukulch15

@qgadrian Hey thanks for the awesome library. I have some concerns regarding automatic installations as well. I placed some logs within the library code and found that the git hooks path that the code uses in case of mix git_hooks.install is different from the one that is generated when we use mix deps.compile.
I believe that when we use mix deps.compile it takes the git hook directory relative to the deps folder. Maybe I am wrong but just wanted to let you know.

qgadrian

qgadrian

Did you try the latest release? I recently added support for “other cases” but the regular, monolith, standard, elixir application.

If you tried it and still have problems, can you please open an issue on GitHub with more details? Then I will take a look and help you out with it :smiling_face:

Last Post!

Mukulch15

Mukulch15

Thanks for taking the time to reply. Seems that the new release is not working as well. I will raise an issue on Github with more details.

Where Next?

Popular in Announcing Top

mischov
import Meeseeks.CSS html = HTTPoison.get!("https://news.ycombinator.com/").body for story <- Meeseeks.all(html, css("tr.athing")) do...
New
treble37
Just looking for a little feedback on a tiny helper library I built - Sometimes I find the need to convert maps with atom keys to maps w...
New
michalmuskala
Hello everybody. I have just released Jason - a new JSON library. You might be wondering, why do we need a new library? The primary foc...
New
danschultzer
None of the current solutions worked well for me, so I went ahead and built a user management system from scratch. This project took far...
548 30338 241
New
oltarasenko
Dear Elixir community, After a year of development, bug fixes, and improvements, we are proudly ready to share the release of Crawly 0.1...
New
nikokozak
Hello all, I’ve been working on Svonix - a library for quickly integrating Svelte components into Phoenix views. It’s a much-needed succ...
New
type1fool
WebAuthnLiveComponent WebAuthnComponents See this post about renaming the package. Passwordless authentication for Phoenix LiveView app...
New

Other popular topics Top

electic
Hi, I am new to Elixir. I am trying to use the DateTime component to insert a date into MySQL however the there seems to be no way to fo...
New
nobody
Hi! In PHP: $_SERVER[‘SERVER_ADDR’] - in Elixir? Searched the docs for ip address and the web, no good results. Thanks!
New
joaquinalcerro
Hi there, I am working with Ecto-Postgresql and I need to call all of the records from a specific table but the table has 40,000 records...
New
ashish173
I am using Ecto timestamps with postgres, I can see the timestamps() use the :naive_dateime but for my use case I wanted to store the ti...
New
msaraiva
Surface is an experimental library built on top of Phoenix LiveView and its new LiveComponent API that aims to provide a more declarative...
564 44139 214
New
AngeloChecked
What learn first? Rust or Elixir Hi Elixir community! I’m here because i want learn a new language. I’m a junior developer and mainly i ...
New

We're in Beta

About us Mission Statement