GitBlit email notification on push and commit

534 Views Asked by At

I want to send email latter with commit diff, when each commit will pushed. I found some info here http://gitblit.com/setup_hooks.html, but i dont understand where should i put my Post-Receive, and what structure it will have. Can somebody help me with usefull links, or some info

1

There are 1 best solutions below

0
Mikalai Daronin On BEST ANSWER

Open file gitblit/data/gitblit.properties and add the following lines:

mail.server   = <SMTP server>
mail.port     = <SMTP port>
mail.username = <SMTP username>
mail.password = <SMTP password>

# Uncomment one line of these two depending on your SMTP server
# mail.smtps    = true
# mail.starttls = true

mail.fromAddress    = <SMTP from address, e.g. [email protected]>
mail.adminAddresses = <Admin email address (optional)>

groovy.postReceiveScripts = sendmail.groovy

That's it. If you set mail.adminAddresses Gitblit will send an email to that address on every push.


It is also possible to set the mailing list for a specific repository (open your repo → edit → miscellaneous → mailing lists):