Merge pull request #10 from apache/base-exception

Don't catch BaseException
diff --git a/notifier.py b/notifier.py
index 897facc..ffa8288 100644
--- a/notifier.py
+++ b/notifier.py
@@ -281,7 +281,7 @@
             msg_headers = {}
             msgid = "<%s-%s@gitbox.apache.org>" % (node_id, str(uuid.uuid4()))
             msgid_OP = "<%s@gitbox.apache.org>" % node_id
-            if action == "open":
+            if action == "open" and not payload.get("changes"):  # NB: If payload has a 'changes' element that is not None, it is NOT a new PR!
                 msgid = msgid_OP  # This is the first email, make a deterministic message id
             else:
                 msg_headers = {"In-Reply-To": msgid_OP}  # Thread from the first PR/issue email
diff --git a/templates/close_issue.txt b/templates/close_issue.txt
index ecb904d..7207de1 100644
--- a/templates/close_issue.txt
+++ b/templates/close_issue.txt
@@ -1,4 +1,4 @@
-subject: [GitHub] [%(repository)s] %(user)s closed issue #%(issue_id)s: %(title)s
+subject: Re: [I] %(title)s [%(repository)s]
 
 %(user)s closed issue #%(issue_id)s: %(title)s
 URL: %(link)s
diff --git a/templates/close_pr.txt b/templates/close_pr.txt
index 2907d23..59bc9a9 100644
--- a/templates/close_pr.txt
+++ b/templates/close_pr.txt
@@ -1,4 +1,4 @@
-subject: [GitHub] [%(repository)s] %(user)s closed pull request #%(pr_id)s: %(title)s
+subject: Re: [PR] %(title)s [%(repository)s]
 
 %(user)s closed pull request #%(pr_id)s: %(title)s
 URL: %(link)s
diff --git a/templates/comment_issue.txt b/templates/comment_issue.txt
index 6c93142..828d5c6 100644
--- a/templates/comment_issue.txt
+++ b/templates/comment_issue.txt
@@ -1,4 +1,4 @@
-subject: [GitHub] [%(repository)s] %(user)s commented on issue #%(issue_id)s: %(title)s
+subject: Re: [I] %(title)s [%(repository)s]
 
 %(user)s commented on issue #%(issue_id)s:
 URL: %(link)s
diff --git a/templates/comment_pr.txt b/templates/comment_pr.txt
index fabb8a3..dad21c0 100644
--- a/templates/comment_pr.txt
+++ b/templates/comment_pr.txt
@@ -1,4 +1,4 @@
-subject: [GitHub] [%(repository)s] %(user)s commented on pull request #%(pr_id)s: %(title)s
+subject: Re: [PR] %(title)s [%(repository)s]
 
 %(user)s commented on PR #%(pr_id)s:
 URL: %(link)s
diff --git a/templates/diffcomment.txt b/templates/diffcomment.txt
index bda6aea..9f2e5c5 100644
--- a/templates/diffcomment.txt
+++ b/templates/diffcomment.txt
@@ -1,4 +1,4 @@
-subject: [GitHub] [%(repository)s] %(user)s commented on a diff in pull request #%(pr_id)s: %(title)s
+subject: Re: [PR] %(title)s [%(repository)s]
 
 %(user)s commented on code in PR #%(pr_id)s:
 URL: %(link)s
diff --git a/templates/merge_pr.txt b/templates/merge_pr.txt
index 4154e77..fb76276 100644
--- a/templates/merge_pr.txt
+++ b/templates/merge_pr.txt
@@ -1,4 +1,4 @@
-subject: [GitHub] [%(repository)s] %(user)s merged pull request #%(pr_id)s: %(title)s
+subject: Re: [PR] %(title)s [%(repository)s]
 
 %(user)s merged PR #%(pr_id)s:
 URL: %(link)s
diff --git a/templates/new_issue.txt b/templates/new_issue.txt
index 3b5d895..8941168 100644
--- a/templates/new_issue.txt
+++ b/templates/new_issue.txt
@@ -1,4 +1,4 @@
-subject: [GitHub] [%(repository)s] %(user)s opened a new issue, #%(issue_id)s: %(title)s
+subject: [I] %(title)s [%(repository)s]
 
 %(user)s opened a new issue, #%(issue_id)s:
 URL: %(link)s
diff --git a/templates/new_pr.txt b/templates/new_pr.txt
index 609556b..c5d17e0 100644
--- a/templates/new_pr.txt
+++ b/templates/new_pr.txt
@@ -1,4 +1,4 @@
-subject: [GitHub] [%(repository)s] %(user)s opened a new pull request, #%(pr_id)s: %(title)s
+subject: [PR] %(title)s [%(repository)s]
 
 %(user)s opened a new pull request, #%(pr_id)s:
 URL: %(link)s