<pre style='margin:0'>
Rainer Müller (raimue) pushed a commit to branch master
in repository trac.macports.org.

</pre>
<p><a href="https://github.com/macports/trac.macports.org/commit/5db10be5d12937914182360b570606468616ce52">https://github.com/macports/trac.macports.org/commit/5db10be5d12937914182360b570606468616ce52</a></p>
<pre style="white-space: pre; background: #F8F8F8"><span style='display:block; white-space:pre;color:#808000;'>commit 5db10be5d12937914182360b570606468616ce52
</span>Author: Rainer Müller <raimue@macports.org>
AuthorDate: Sat Jan 26 15:50:33 2019 +0000

<span style='display:block; white-space:pre;color:#404040;'>    trac-github-update: Quote sender names
</span><span style='display:block; white-space:pre;color:#404040;'>    
</span><span style='display:block; white-space:pre;color:#404040;'>    The names of the sender in the From header needs to be quoted in order to
</span><span style='display:block; white-space:pre;color:#404040;'>    handle special characters properly. This was triggered by GitHub usernames of
</span><span style='display:block; white-space:pre;color:#404040;'>    GitHub Apps having a "[bot]" tag attached.
</span>---
 plugins/hooks/trac-github-update.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

<span style='display:block; white-space:pre;color:#808080;'>diff --git a/plugins/hooks/trac-github-update.py b/plugins/hooks/trac-github-update.py
</span><span style='display:block; white-space:pre;color:#808080;'>index ad41188..3203582 100755
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/plugins/hooks/trac-github-update.py
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/plugins/hooks/trac-github-update.py
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -168,9 +168,9 @@ class GitHubWebhookEnvironment(GenericEnvironment):
</span>         if not result:
             name, email = self._github.get_user(username, knownname, knownemail)
             if name:
<span style='display:block; white-space:pre;background:#ffe0e0;'>-                result = "%s <%s>" % (name, email)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+                result = "\"%s\" <%s>" % (name, email)
</span>             else:
<span style='display:block; white-space:pre;background:#ffe0e0;'>-                result = "%s <%s@users.noreply.github.com>" % (username, username)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+                result = "\"%s\" <%s@users.noreply.github.com>" % (username, username)
</span>         return result
 
     def get_fromaddr(self, change=None):
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -192,7 +192,7 @@ class GitHubWebhookEnvironment(GenericEnvironment):
</span>                         knownemail = None
                     author = self._get_username_email(username, knownname, knownemail)
                 if not author:
<span style='display:block; white-space:pre;background:#ffe0e0;'>-                    author = "%s <%s>" % (commit['author']['name'], commit['author']['email'])
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+                    author = "\"%s\" <%s>" % (commit['author']['name'], commit['author']['email'])
</span>                 return author.encode('utf-8')
         return super(GitHubWebhookEnvironment, self).get_fromaddr(change)
 
</pre><pre style='margin:0'>

</pre>