1
0
mirror of https://github.com/openSUSE/osc.git synced 2025-01-22 21:16:16 +01:00

- do_requestmaintainership: added --role option to allow different roles ('bugowner' or 'maintainer') (slightly modified version of Anas Nashif's <nashif@linux.intel.com> patch)

This commit is contained in:
Marcus Huewe 2010-11-24 16:41:02 +01:00
parent 115de1e5c1
commit 6d89fee500

View File

@ -1356,6 +1356,8 @@ Please submit there instead, or use --nodevelproject to force direct submission.
@cmdln.option('-m', '--message', metavar='TEXT',
help='specify message TEXT')
@cmdln.option('-r', '--role', metavar='role', default='maintainer',
help='specify user role (default: maintainer)')
@cmdln.alias("reqmaintainership")
@cmdln.alias("reqms")
def do_requestmaintainership(self, subcmd, opts, *args):
@ -1393,7 +1395,10 @@ Please submit there instead, or use --nodevelproject to force direct submission.
else:
raise oscerr.WrongArgs('Wrong number of arguments.')
arg = [ user, 'maintainer', project, package ]
if not opts.role in ('maintainer', 'bugowner'):
raise oscerr.WrongOptions('invalid \'--role\': either specify \'maintainer\' or \'bugowner\'')
arg = [ user, opts.role, project, package ]
actionsxml = self._add_role(arg, None)