stagingapi: get_open_requests() provide query_extra option.
This commit is contained in:
parent
8109772372
commit
06d93b7344
@ -549,7 +549,7 @@ class StagingAPI(object):
|
||||
self.save_file_content('{}:Staging'.format(self.project), 'dashboard', 'ignored_requests', ignore)
|
||||
|
||||
@memoize(session=True, add_invalidate=True)
|
||||
def get_open_requests(self):
|
||||
def get_open_requests(self, query_extra=None):
|
||||
"""
|
||||
Get all requests with open review for staging project
|
||||
that are not yet included in any staging project
|
||||
@ -567,6 +567,8 @@ class StagingAPI(object):
|
||||
|
||||
query = {'match': "state/@name='review' and review[{}] and ({})".format(
|
||||
where, ' or '.join(targets))}
|
||||
if query_extra is not None:
|
||||
query.update(query_extra)
|
||||
url = self.makeurl(['search', 'request'], query)
|
||||
f = http_GET(url)
|
||||
root = ET.parse(f).getroot()
|
||||
|
Loading…
x
Reference in New Issue
Block a user