dwyl / github-backup

:octocat: :back: 🆙 Backup your GitHub Issues so you can still work when (they/you are) offline.
https://github-backup.herokuapp.com
GNU General Public License v2.0
31 stars 3 forks source link

Pre-commit hook does not check test pass/failure before allowing commit ... #112

Open nelsonic opened 6 years ago

nelsonic commented 6 years ago

I'm trying to debug why a test is not passing for #35 and when I attempt to make a commit on my branch (where tests are failing) I am not prevented from doing so ...

image

pre_commit is in the mix.exs file: https://github.com/dwyl/github-backup/blob/9aec5c46b47922ea0cfd4c486008d0fb44b1248a/mix.exs#L50 But it's unclear what command is being run on the pre-commit hook ...

https://github.com/dwyl/github-backup/blob/5033458e0385a927faa7efb5cdb97584bf87d901/config/prod.exs#L34-L35

Why is the pre-commit defined in prod.exs ?

It would be desirable to have the pre-commit run on localhost i.e. dev.exs ... @SimonLab / @Cleop thoughts...?

SimonLab commented 6 years ago

Yes the pre-commit should be on the dev.exs config file :+1: I think we missed some steps on how pre-commit is run. I'll review the pre-commit documentation (https://github.com/dwyl/elixir-pre-commit) and update the configuration file with the commands to run