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

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

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


    @SpicyCat 不能不让别人提交啊 哈哈
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   1363 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 31ms · UTC 20:58 · PVG 04:58 · LAX 12:58 · JFK 15:58
    ♥ Do have faith in what you're doing.