简体   繁体   中英

git remote branch monitoring

I am working with a remote git repo that does NOT support email notification upon commit. I am wondering if anyone know any means/tools to monitor and track the commit on one or more branches?

Thanks

Oliver

Fetch every other minute. If there are changes, react to them (send an email, for example).

You can look at SCuMD GIT Server. I described it's basic configuration here:

Best Mac OSX and Windows Git Clients, servers and diff tools?

It supports email-notifications (and a lot of other cool stuff like DB user authorization, independent SSH server, etc...).

Here is example config with e-mail notifications:

<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>

Server is still at beta stage, but it's fully functional and we using it at work (no problems yet).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM