Better github-hook

This commit is contained in:
alesapin 2020-06-24 17:48:43 +03:00
parent 751319d0ef
commit cecf397057

View File

@ -21,7 +21,7 @@ def process_issue_event(response):
state=issue['state'],
assignees=[assignee['login'] for assignee in issue['assignees']],
created_at=issue['created_at'],
body=issue['body'],
body=issue['body'] if issue['body'] else '',
title=issue['title'],
comments=issue['comments'],
raw_json=json.dumps(response),)
@ -42,7 +42,7 @@ def process_issue_comment_event(response):
state=issue['state'],
assignees=[assignee['login'] for assignee in issue['assignees']],
created_at=issue['created_at'],
body=issue['body'],
body=issue['body'] if issue['body'] else '',
title=issue['title'],
comments=issue['comments'],
comment_body=comment['body'],
@ -64,7 +64,7 @@ def process_pull_request_event(response):
author=pull_request['user']['login'],
labels=[label['name'] for label in pull_request['labels']],
state=pull_request['state'],
body=pull_request['body'],
body=pull_request['body'] if pull_request['body'] else '',
title=pull_request['title'],
created_at=pull_request['created_at'],
assignees=[assignee['login'] for assignee in pull_request['assignees']],