blob: e15851212d14184f80928c005fd4fceafbda90ad (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
from ..utility import *
def handle(data, theme):
actor = data['sender']['login'] \
if 'sender' in data and 'login' in data['sender'] \
else None
action = data['action'] if 'action' in data else None
url = None
for key in data:
if key not in ['repository', 'sender'] \
and isinstance(data[key], dict)\
and 'html_url' in data[key]:
url = data[key]['html_url']
break
theme.unknown(
eventType = data['eventType'],
action = action,
actor = actor,
url = url
)
|