From c614879c4d17a2896b25a2dff2e0155b6ec03598 Mon Sep 17 00:00:00 2001 From: Ralph Bean Date: Mar 26 2019 01:13:53 +0000 Subject: Github pull requests are on the same topic as issues. Distinguish! --- diff --git a/sync2jira/upstream.py b/sync2jira/upstream.py index e8c9767..522d55e 100644 --- a/sync2jira/upstream.py +++ b/sync2jira/upstream.py @@ -169,8 +169,13 @@ def handle_github_comment(msg, config): if upstream not in mapped_repos: log.info("%r not in github map: %r", upstream, mapped_repos.keys()) return None + issue = msg['msg']['issue'] + if 'pull_request' in issue: + log.info("%r is a pull request. Ignoring.", issue.get('html_url')) + return None + comment = msg['msg']['comment'] log.info("Fetching comments for: %s", issue['url']) issue['comments'] = _fetch_github_data("%s/comments" % (issue['url']), headers).json()