Github file change notification

前端 未结 5 1700
不思量自难忘°
不思量自难忘° 2020-12-25 10:40

Is there a way to notify people on change of some certain files? Specifically, I would like to track change of *.sql files and and notify our developers on a change. How can

5条回答
  •  旧时难觅i
    2020-12-25 11:12

    Use git diff-tree in your post-receive hook:

     git diff-tree --name-status -rz
    

    You can grep the result to check if certain files are modified (status 'M'), as described in this answer.
    you can find many examples on gist.github.com, with this one using the --name-status option.

提交回复
热议问题