Fix GitHub tracebacks from issue['pull_request'] not existing.

(imported from commit f124a8e30e25d9321e9abe2fe04a5bd35ce24445)
This commit is contained in:
Tim Abbott 2014-03-13 14:23:45 -04:00 committed by Leo Franchi
parent 400e355a2f
commit 9aa3de0664
1 changed files with 1 additions and 1 deletions

View File

@ -93,7 +93,7 @@ def api_github_v2(user_profile, event, payload, branches, default_stream, commit
elif event == 'issue_comment': elif event == 'issue_comment':
# Comments on both issues and pull requests come in as issue_comment events # Comments on both issues and pull requests come in as issue_comment events
issue = payload['issue'] issue = payload['issue']
if issue['pull_request']['diff_url'] is None: if 'pull_request' not in issue or issue['pull_request']['diff_url'] is None:
# It's an issues comment # It's an issues comment
target_stream = issue_stream target_stream = issue_stream
noun = 'issue' noun = 'issue'