• 请不要在回答技术问题时复制粘贴 AI 生成的内容
YORYOR
V2EX  ›  程序员

gitlab 上当项目中某个指定文件更新了就收到邮件

  •  
  •   YORYOR · Aug 25, 2016 · 3991 views
    This topic created in 3575 days ago, the information mentioned may be changed or developed.
    rt 因为某文件希望不被更改,但是无法保证,所以找了半天 发现 hook 也没有这种功能,有简单的实现方法么
    6 replies    2016-08-25 13:45:00 +08:00
    shenmimu
        1
    shenmimu  
       Aug 25, 2016   ❤️ 1
    提交你希望保持的版本,提交.gitignore 把这个文件加入。。。😂
    just4test
        2
    just4test  
       Aug 25, 2016   ❤️ 1
    每次调用 hook 去 hash 一下这个文件,更改了就发邮件
    wujunze
        3
    wujunze  
       Aug 25, 2016   ❤️ 1
    @just4test 这个主意不错
    SoloCompany
        4
    SoloCompany  
       Aug 25, 2016   ❤️ 1
    为什么说 hook 没有这个功能
    gitlab 标准的 hook 是 webhook
    你在 webhook 上直接查变更然后执行你想要的行为不就可以了么
    SpicyCat
        5
    SpicyCat  
       Aug 25, 2016   ❤️ 1
    不如弄个 hook ,发现文件变更,就禁止 push
    YORYOR
        6
    YORYOR  
    OP
       Aug 25, 2016
    @SoloCompany
    @wujunze
    @just4test
    @shenmimu 每次 hook 就 md5 一下。。满足需求 。。=_=!


    @SpicyCat 不能不让别人提交啊 哈哈
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5971 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 48ms · UTC 02:30 · PVG 10:30 · LAX 19:30 · JFK 22:30
    ♥ Do have faith in what you're doing.