-
Notifications
You must be signed in to change notification settings - Fork 1
/
Round.py
36 lines (28 loc) · 998 Bytes
/
Round.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
import json
# 11- round1 task1
# 21- round2 task1
# 22- round2 task2
# 31- round1 task1
# 41- round2 task2
def remove(string):
return "".join(string.split())
def squidgameActivity(request):
if 'forkee' in request.keys():
return 11
elif 'issue' in request.keys():
shapes=['triangle', 'star','circle','umbrella']
print(remove((str(request['comment']['body'])).lower()))
if remove((str(request['comment']['body'])).lower()) in shapes:
return 21
else:
return 22
elif 'pull_request' in request.keys():
# print("keys=",request['pull_request'].keys())
# print(str(request['pull_request']['rebaseable']))
if request['action']=='opened' and str(request['pull_request']['rebaseable'])=='None':
return 31
elif request['action']=='opened' and str(request['pull_request']['rebaseable'])!='None':
return 41
else:
return 0
return 0