]> source.dussan.org Git - vaadin-framework.git/commitdiff
Email author about merge failures
authorArtur Signell <artur@vaadin.com>
Tue, 25 Feb 2014 10:28:32 +0000 (12:28 +0200)
committerVaadin Code Review <review@vaadin.com>
Wed, 26 Feb 2014 20:00:39 +0000 (20:00 +0000)
Change-Id: I58554c9095e815087bee321dfc57e9e45b5b0481

scripts/automerge7.sh

index f929b9c69c90094f047e968d6a9d997abd691d01..079dec7eea1e75cb08c76088758c47d6df7ea69d 100755 (executable)
@@ -7,6 +7,11 @@ TO=master
 IGNORE_HEAD=origin/$IGNORE
 FROM_HEAD=origin/$FROM
 PUSH="origin HEAD:refs/for/$TO"
+EMAIL_AUTHOR=
+if [ "$1" = "email" ]
+then
+       EMAIL_AUTHOR=1
+fi
 
 show() {
         sCommit=$1
@@ -112,6 +117,13 @@ do
                         echo "Stopping merge at $commit because of merge conflicts"
                         echo "The following commit must be manually merged."
                         show $commit
+                        
+                        if [ "$EMAIL_AUTHOR" = "1" ]
+                        then
+                               author=`git show --format=%aE -s $commit`
+                               echo "Email sent to $author"
+                               (show $commit ; echo ; git merge $commit) |mail -s "Merge of your commit $commit to $TO failed" $author
+                        fi
                         exit 7
                        fi
         elif [ "$mergeDirective" == "no" ]