mirror of
https://github.com/openSUSE/osc.git
synced 2024-12-27 02:16:12 +01:00
add submitreq delete action (thanks to Dirk for the patch)
This commit is contained in:
parent
acaef1d250
commit
de0bb98200
@ -431,6 +431,9 @@ class Osc(cmdln.Cmdln):
|
||||
"decline" will change the request state to "declined" and append a
|
||||
message that you specify with the --message option.
|
||||
|
||||
"delete" will change the request state to "deleted" and append a
|
||||
message that you specify with the --message option.
|
||||
|
||||
"accept" will change the request state to "accepted" and will trigger
|
||||
the actual submit process. That would normally be a server-side copy of
|
||||
the source package to the target package.
|
||||
@ -442,13 +445,14 @@ class Osc(cmdln.Cmdln):
|
||||
osc submitreq list [PRJ [PKG]]
|
||||
osc submitreq show [-d] ID
|
||||
osc submitreq decline [-m TEXT] ID
|
||||
osc submitreq delete [-m TEXT] ID
|
||||
osc submitreq accept [-m TEXT] ID
|
||||
${cmd_option_list}
|
||||
"""
|
||||
|
||||
args = slash_split(args)
|
||||
|
||||
cmds = ['create', 'list', 'show', 'decline', 'accept']
|
||||
cmds = ['create', 'list', 'show', 'decline', 'accept', 'delete']
|
||||
if not args or args[0] not in cmds:
|
||||
raise oscerr.WrongArgs('Unknown submitreq action. Choose one of %s.' \
|
||||
% ', '.join(cmds))
|
||||
@ -510,7 +514,7 @@ class Osc(cmdln.Cmdln):
|
||||
|
||||
if len(args) > 1:
|
||||
package = args[1]
|
||||
elif cmd in ['show', 'decline', 'accept']:
|
||||
elif cmd in ['show', 'decline', 'accept', 'delete']:
|
||||
reqid = args[0]
|
||||
|
||||
|
||||
@ -571,6 +575,11 @@ Please submit there instead, or use --nodevelproject to force direct submission.
|
||||
r = change_submit_request_state(conf.config['apiurl'],
|
||||
reqid, 'accepted', opts.message or '')
|
||||
print r
|
||||
# delete
|
||||
elif cmd == 'delete':
|
||||
r = change_submit_request_state(conf.config['apiurl'],
|
||||
reqid, 'deleted', opts.message or '')
|
||||
print r
|
||||
|
||||
|
||||
# editmeta and its aliases are all depracated
|
||||
|
Loading…
Reference in New Issue
Block a user