mirror of
https://github.com/openSUSE/osc.git
synced 2025-01-22 21:16:16 +01:00
- show declined requests to the creator on "my rq" function
This commit is contained in:
parent
2e2deb3ec8
commit
c076e2b4d2
1
NEWS
1
NEWS
@ -13,6 +13,7 @@
|
||||
- branch --add-repositories can be used to add repos from source project to target project
|
||||
- branch --extend-package-names can be used to do mbranch like branch of a single package
|
||||
- branch --new-package can be used to do branch from a not yet existing package (to define later submit target)
|
||||
- show declined requests which created by user
|
||||
|
||||
0.132
|
||||
- rdelete and undelete command requesting now a comment
|
||||
|
@ -5691,6 +5691,22 @@ Please submit there instead, or use --nodevelproject to force direct submission.
|
||||
# try api side search as supported since OBS 2.2
|
||||
try:
|
||||
requests = []
|
||||
# declined requests submitted by me
|
||||
u = makeurl(apiurl, ['request'], {
|
||||
'view' : 'collection',
|
||||
'states': 'declined',
|
||||
'roles': 'creator',
|
||||
'user' : user,
|
||||
})
|
||||
f = http_GET(u)
|
||||
root = ET.parse(f).getroot()
|
||||
if root.findall('request'):
|
||||
print "Declined requests created by you (revoke, reopen or supersede):\n"
|
||||
for node in root.findall('request'):
|
||||
r = Request()
|
||||
r.read(node)
|
||||
print r.list_view(), '\n'
|
||||
print ""
|
||||
# open reviews
|
||||
u = makeurl(apiurl, ['request'], {
|
||||
'view' : 'collection',
|
||||
@ -5701,10 +5717,13 @@ Please submit there instead, or use --nodevelproject to force direct submission.
|
||||
})
|
||||
f = http_GET(u)
|
||||
root = ET.parse(f).getroot()
|
||||
if root.findall('request'):
|
||||
print "Requests which request a review by you:\n"
|
||||
for node in root.findall('request'):
|
||||
r = Request()
|
||||
r.read(node)
|
||||
requests.append(r)
|
||||
print r.list_view(), '\n'
|
||||
print ""
|
||||
# open requests
|
||||
u = makeurl(apiurl, ['request'], {
|
||||
'view' : 'collection',
|
||||
@ -5714,12 +5733,13 @@ Please submit there instead, or use --nodevelproject to force direct submission.
|
||||
})
|
||||
f = http_GET(u)
|
||||
root = ET.parse(f).getroot()
|
||||
if root.findall('request'):
|
||||
print "Requests for your packages:\n"
|
||||
for node in root.findall('request'):
|
||||
r = Request()
|
||||
r.read(node)
|
||||
requests.append(r)
|
||||
for r in sorted(requests):
|
||||
print r.list_view(), '\n'
|
||||
print ""
|
||||
return
|
||||
except urllib2.HTTPError, e:
|
||||
if e.code == 400:
|
||||
|
Loading…
Reference in New Issue
Block a user