|
23 | 23 | """ |
24 | 24 | # Build-In Modules |
25 | 25 | import logging |
26 | | -import warnings |
| 26 | +import os |
27 | 27 | import traceback |
28 | | -from time import sleep |
29 | | -import requests |
| 28 | +import warnings |
30 | 29 | from copy import deepcopy |
31 | | -import os |
| 30 | +from time import sleep |
32 | 31 |
|
33 | 32 | # 3rd Party Modules |
34 | 33 | import fedmsg |
35 | 34 | import fedmsg.config |
36 | 35 | import jinja2 |
37 | | -from requests_kerberos import HTTPKerberosAuth, OPTIONAL |
| 36 | +import requests |
| 37 | +from requests_kerberos import OPTIONAL, HTTPKerberosAuth |
38 | 38 |
|
39 | 39 | # Local Modules |
40 | | -import sync2jira.upstream_issue as u_issue |
41 | | -import sync2jira.upstream_pr as u_pr |
42 | 40 | import sync2jira.downstream_issue as d_issue |
43 | 41 | import sync2jira.downstream_pr as d_pr |
44 | | -from sync2jira.mailer import send_mail |
| 42 | +import sync2jira.upstream_issue as u_issue |
| 43 | +import sync2jira.upstream_pr as u_pr |
45 | 44 | from sync2jira.intermediary import matcher |
| 45 | +from sync2jira.mailer import send_mail |
46 | 46 |
|
47 | 47 | # Set up our logging |
48 | 48 | FORMAT = "[%(asctime)s] %(levelname)s: %(message)s" |
|
61 | 61 | # Issue related handlers |
62 | 62 | issue_handlers = { |
63 | 63 | # GitHub |
| 64 | + # New webhook-2fm topics |
| 65 | + 'github.issues': u_issue.handle_github_message, |
| 66 | + 'github.issue_comment': u_issue.handle_github_message, |
| 67 | + # Old github2fedmsg topics |
64 | 68 | 'github.issue.opened': u_issue.handle_github_message, |
65 | 69 | 'github.issue.reopened': u_issue.handle_github_message, |
66 | 70 | 'github.issue.labeled': u_issue.handle_github_message, |
|
77 | 81 | # PR related handlers |
78 | 82 | pr_handlers = { |
79 | 83 | # GitHub |
| 84 | + # New webhook-2fm topics |
| 85 | + 'github.pull_request': u_pr.handle_github_message, |
| 86 | + 'github.issue_comment': u_pr.handle_github_message, |
| 87 | + # Old github2fedmsg topics |
80 | 88 | 'github.pull_request.opened': u_pr.handle_github_message, |
81 | 89 | 'github.pull_request.edited': u_pr.handle_github_message, |
82 | 90 | 'github.issue.comment': u_pr.handle_github_message, |
|
0 commit comments