gnustavo / Git-Hooks

Framework for implementing Git (and Gerrit) hooks
http://search.cpan.org/dist/Git-Hooks/
41 stars 17 forks source link

Implement Git::Hooks::Notify plugin #43

Closed gnustavo closed 6 years ago

gnustavo commented 7 years ago

Implement a plugin called something like Git::Hooks::Notify to send notifications (initially by email) when specific files are changed in the repository. It could be associated with the post-receive/post-update hooks.

The files should be specified by regular expressions matching their paths.

It could be usefull to be able to restrict notifications to changes affecting specific branches, which should also be specified by regular expressions.

The notification rules could be something like this:

[githooks "notify"]
  include = [BRANCH] FILE [recipients]

The notification should be sent to the union of the recipients of all inclusion rules matching a changed file. This would allow one to augment the recipient list for specific files.

It would be nice to be able to exclude files. Perhaps by using exclude instead of include.