dwyl / dwyl/github-backup

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

未关闭
#112 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
chore question
主要语言
Elixir
星标
33
派生
3
PR 合并指标
30 天内没有已合并 PR

描述

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](https://user-images.githubusercontent.com/194400/37852927-618ff98e-2edc-11e8-9fcf-3bd937fd38de.png)

`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...?

贡献指南

这个仓库没有索引到贡献指南

调研方向

Start with the pre_commit definition in mix.exs and the referenced configuration in config/prod.exs, then compare it with dev.exs. Identify which command the hook runs and verify that a failing test prevents a local commit while the hook uses the appropriate environment.

由索引模型根据 Issue 内容生成。

评估

技术栈
elixir, git
领域
testing-qa, tooling
Issue 类型
缺陷
难度
4/5
预计耗时
3-5 天
活跃度
停滞
描述清晰度
需要澄清
新手友好度
35/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。