mirror of
https://github.com/openSUSE/osc.git
synced 2024-12-27 02:16:12 +01:00
Do not ignore --type parameter in "osc review list --type..."
There is no reason why we should ignore the --type parameter in this case.
This commit is contained in:
parent
54ee1cdba2
commit
1c21c67659
@ -2283,7 +2283,8 @@ Please submit there instead, or use --nodevelproject to force direct submission.
|
||||
|
||||
if subcmd == 'review':
|
||||
# FIXME: do the review list for the user and for all groups he belong to
|
||||
results = get_review_list(apiurl, project, package, who, opts.group, opts.project, opts.package, state_list)
|
||||
results = get_review_list(apiurl, project, package, who, opts.group, opts.project, opts.package, state_list,
|
||||
opts.type)
|
||||
else:
|
||||
if opts.involved_projects:
|
||||
who = who or conf.get_apiurl_usr(apiurl)
|
||||
|
@ -4227,7 +4227,8 @@ def change_request_state_template(req, newstate):
|
||||
print('error: cannot interpolate \'%s\' in \'%s\'' % (e.args[0], tmpl_name), file=sys.stderr)
|
||||
return ''
|
||||
|
||||
def get_review_list(apiurl, project='', package='', byuser='', bygroup='', byproject='', bypackage='', states=()):
|
||||
def get_review_list(apiurl, project='', package='', byuser='', bygroup='', byproject='', bypackage='', states=(),
|
||||
req_type=''):
|
||||
# this is so ugly...
|
||||
def build_by(xpath, val):
|
||||
if 'all' in states:
|
||||
@ -4257,6 +4258,9 @@ def get_review_list(apiurl, project='', package='', byuser='', bygroup='', bypro
|
||||
elif byproject:
|
||||
xpath = build_by(xpath, '@by_project=\'%s\'' % byproject)
|
||||
|
||||
if req_type:
|
||||
xpath = xpath_join(xpath, 'action/@type=\'%s\'' % req_type, op='and')
|
||||
|
||||
# XXX: we cannot use the '|' in the xpath expression because it is not supported
|
||||
# in the backend
|
||||
todo = {}
|
||||
|
Loading…
Reference in New Issue
Block a user