Hi,

I have been working on a script that would allow the git repos to send notification mails whenever changes are pushed. This is the equivalent of the automated notification mails that get sent to gnucash-patches and gnucash-changes whenever a change is committed to svn.

Since git's behaviour doesn't map 1 on 1 to svn's, I have started from an example script that is distributed together with git. Attached you will find two example mails generated by the new script

These were generated in a repo called "testing", on branch "master" after I had pushed two commits to the git repo. It's worth noting already that the script will only send one mail even though it processes two commits. The script sends one mail per push and per branch. So if one push affects 3 branches, it will send 3 mails. Well, actually 3 sets of 2 mails.

The first mail contains a summary of the commit logs (similar to what is currently sent to gnucash-changes), the second one also contains the commit diffs (similar to what is currently sent to gnucash-patches).

Personally I think the introduction in the mails is way to verbose. I'm open to suggestions to improve this.

Please give your feedback, thanks.

Geert

--- Begin Message ---
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "testing".

The branch, master has been updated
       via  d774333d2c7b1c9759054eeddd5d05b57a07a004 (commit)
       via  4807c5abb9b5446b7f24e2bda5a31476e10759ec (commit)
      from  93f930a19515e95e9c48dae48d7230fa79d922cc (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit d774333d2c7b1c9759054eeddd5d05b57a07a004
Author: Geert Janssens <[email protected]>
Date:   Wed Jan 30 15:11:02 2013 +0100

    Change dummy testfile, second commit

commit 4807c5abb9b5446b7f24e2bda5a31476e10759ec
Author: Geert Janssens <[email protected]>
Date:   Wed Jan 30 15:10:36 2013 +0100

    Change dummy testfile, first commit

-----------------------------------------------------------------------

Summary of changes:
 testfile.txt |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
testing


--- End Message ---
--- Begin Message ---
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "testing".

The branch, master has been updated
       via  d774333d2c7b1c9759054eeddd5d05b57a07a004 (commit)
       via  4807c5abb9b5446b7f24e2bda5a31476e10759ec (commit)
      from  93f930a19515e95e9c48dae48d7230fa79d922cc (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit d774333d2c7b1c9759054eeddd5d05b57a07a004
Author: Geert Janssens <[email protected]>
Date:   Wed Jan 30 15:11:02 2013 +0100

    Change dummy testfile, second commit

diff --git a/testfile.txt b/testfile.txt
index b6d7b12..1fc1102 100644
--- a/testfile.txt
+++ b/testfile.txt
@@ -1,4 +1,3 @@
 Dummy test
-Ipsum loret
-More text
+
 Let's just continue to write nonsense, all for a good cause of course ;)

commit 4807c5abb9b5446b7f24e2bda5a31476e10759ec
Author: Geert Janssens <[email protected]>
Date:   Wed Jan 30 15:10:36 2013 +0100

    Change dummy testfile, first commit

diff --git a/testfile.txt b/testfile.txt
index 87773b7..b6d7b12 100644
--- a/testfile.txt
+++ b/testfile.txt
@@ -1,3 +1,4 @@
 Dummy test
 Ipsum loret
 More text
+Let's just continue to write nonsense, all for a good cause of course ;)

-----------------------------------------------------------------------

Summary of changes:
 testfile.txt |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
testing


--- End Message ---
_______________________________________________
gnucash-devel mailing list
[email protected]
https://lists.gnucash.org/mailman/listinfo/gnucash-devel

Reply via email to