我正在使用远程git仓库,它在提交时不支持电子邮件通知。我想知道是否有人知道在一个或多个分支上监视和跟踪提交的任何手段/工具?
由于
奥利弗
答案 0 :(得分:4)
每隔一分钟取一次。如果有变化,请对它们作出反应(例如发送电子邮件)。
答案 1 :(得分:1)
您可以查看SCuMD GIT Server。我在这里描述了它的基本配置:
Best Mac OSX and Windows Git Clients, servers and diff tools?
它支持电子邮件通知(以及许多其他很酷的东西,如数据库用户授权,独立的SSH服务器等......)。
以下是带有电子邮件通知的示例配置:
<beans:beans xmlns="http://asolutions.com/schema/spring/scumd" xmlns:beans="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://asolutions.com/schema/spring/scumd http://asolutions.com/schema/spring/scumd/scumd-0.1.0.xsd">
<git-ssh-server port="1122" repositories-base="${gitRepos}">
<default-server-key-pair />
<listeners>
<!--
Email listener will send emails to provided email/users/groups(all users in each group) when event is triggered.
Each configuration element can be defined either as attribute or inner tag.
event attribute can have following values:
* authenticationSuccess
* authenticationFail
* authorizationSucces
* authorizationFail
* repoCreate
* pull
* push
* commit
Note: If you want to use email listeners, you should also define <email-sender /> tag.
-->
<email event="push" emails="mu@email.com, hello@world.com" subject="My Notification!">
<users>u1, u2</users>
<groups>g1, g2</groups>
</email>
</listeners>
</git-ssh-server>
<!--
If you are using email listeners, you should also define email-sender
in order to define SMTP/SMTPS configuration
-->
<email-sender host="my.host" port="465" protocol="smtps"
auth="true" user="mailsUser" password="secret"
from="git@admin.com" replay-to="git@admin.com"
force-email="test@test.com" />
<acl>
<repository path="**/*.git">
<groups allow="ReadWrite, Create" list="g1, g2" />
</repository>
</acl>
<simple-user-dao>
<group name="g1">
<user name="u1" email="hello@test.com">
<public-key file="/path/to/the/id_rsa.pub" />
<public-key file="/path/to/the/other/id_rsa.pub" />
</user>
<user name="u2" email="u2@test.com">
<public-key file="/path/to/another/key" />
</user>
</group>
<group name="g2" />
</simple-user-dao>
</beans:beans>
服务器仍处于测试阶段,但它功能齐全,我们在工作中使用它(没有问题)。