-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathrequests.py
More file actions
22 lines (20 loc) · 820 Bytes
/
requests.py
File metadata and controls
22 lines (20 loc) · 820 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/usr/bin/env python3
import settings
from pprint import pprint
user = settings.bs.getUserName()
print('Your username seems to be '+user)
print('Creating a request for deleting '+settings.testprj+'/'+settings.testpkg)
options=[{'action': 'delete','tgt_project': settings.testprj,'tgt_package': settings.testpkg}]
request = settings.bs.createRequest(options,'Description','Comment',True)
print('Adding a review to previous created request with ID: '+request.reqid)
if not settings.bs.addReview(request.reqid,"Message",user):
print("Failed!")
exit()
print('Accepting the review')
if not settings.bs.setReviewState(request.reqid,"accepted","Message2",user):
print("Failed!")
exit()
print('Revoking the request')
if not settings.bs.setRequestState(request.reqid,"revoked","Message3"):
print("Failed!")
exit()