mirror of
https://github.com/openSUSE/osc.git
synced 2025-01-12 08:56:13 +01:00
fix review state change for review by_group
This commit is contained in:
parent
90325e90f4
commit
8321e41096
@ -1846,7 +1846,7 @@ Please submit there instead, or use --nodevelproject to force direct submission.
|
|||||||
opts.message = edit_message()
|
opts.message = edit_message()
|
||||||
if cmd in ['accept', 'decline', 'new']:
|
if cmd in ['accept', 'decline', 'new']:
|
||||||
r = change_review_state(apiurl,
|
r = change_review_state(apiurl,
|
||||||
reqid, state_map[cmd], conf.get_apiurl_usr(apiurl), opts.message or '')
|
reqid, state_map[cmd], conf.get_apiurl_usr(apiurl), opts.group, opts.message or '')
|
||||||
print r
|
print r
|
||||||
# Change state of entire request
|
# Change state of entire request
|
||||||
elif cmd in ['reopen', 'accept', 'decline', 'wipe', 'revoke']:
|
elif cmd in ['reopen', 'accept', 'decline', 'wipe', 'revoke']:
|
||||||
|
@ -3300,10 +3300,10 @@ def get_request(apiurl, reqid):
|
|||||||
return r
|
return r
|
||||||
|
|
||||||
|
|
||||||
def change_review_state(apiurl, reqid, newstate, by_user='', message='', supersed=''):
|
def change_review_state(apiurl, reqid, newstate, by_user='', by_group='', message='', supersed=''):
|
||||||
u = makeurl(apiurl,
|
u = makeurl(apiurl,
|
||||||
['request', reqid],
|
['request', reqid],
|
||||||
query={'cmd': 'changereviewstate', 'newstate': newstate, 'by_user': by_user, 'superseded_by': supersed})
|
query={'cmd': 'changereviewstate', 'newstate': newstate, 'by_user': by_user, 'by_group': by_group, 'superseded_by': supersed})
|
||||||
f = http_POST(u, data=message)
|
f = http_POST(u, data=message)
|
||||||
root = ET.parse(f).getroot()
|
root = ET.parse(f).getroot()
|
||||||
return root.attrib['code']
|
return root.attrib['code']
|
||||||
|
Loading…
Reference in New Issue
Block a user