mirror of
https://github.com/zulip/zulip.git
synced 2025-11-04 22:13:26 +00:00
github_webhook: Use author's full name if username is not available.
In cases where the webhook payload doesn't have the username for the author of a particular commit (this can happen if the author doesn't have a GitHub account or the author's email is not associated with their GitHub account), we now use the author's full name to format messages.
This commit is contained in:
@@ -180,7 +180,8 @@ def get_push_tags_body(payload):
|
||||
def get_push_commits_body(payload):
|
||||
# type: (Dict[str, Any]) -> Text
|
||||
commits_data = [{
|
||||
'name': commit['author']['username'],
|
||||
'name': (commit.get('author').get('username') or
|
||||
commit.get('author').get('name')),
|
||||
'sha': commit['id'],
|
||||
'url': commit['url'],
|
||||
'message': commit['message']
|
||||
|
||||
Reference in New Issue
Block a user