推送和提交时的 GitBlit 电子邮件通知

GitBlit email notification on push and commit

我想稍后发送带有提交差异的电子邮件,当每个提交都被推送时。我在这里 http://gitblit.com/setup_hooks.html 找到了一些信息,但我不明白我应该把我的 Post-Receive 放在哪里,以及它会有什么结构。有人可以帮我提供有用的链接或一些信息

打开文件 gitblit/data/gitblit.properties 并添加以下行:

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. noreply@example.com>
mail.adminAddresses = <Admin email address (optional)>

groovy.postReceiveScripts = sendmail.groovy

就是这样。如果您设置 mail.adminAddresses Gitblit 将在每次推送时向该地址发送一封电子邮件。


也可以为特定存储库设置邮件列表(打开您的存储库 → 编辑 → 杂项 → 邮件列表):