Merge pull request #1434 from lnussel/leaper

ReviewBot: allow both group and user review
This commit is contained in:
Ludwig Nussel 2018-03-08 16:17:07 +01:00 committed by GitHub
commit 17ebaaa6d6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -427,10 +427,11 @@ class ReviewBot(object):
return False return False
def set_request_ids_search_review(self): def set_request_ids_search_review(self):
review = None
if self.review_user: if self.review_user:
review = "@by_user='%s' and @state='new'" % self.review_user review = "@by_user='%s' and @state='new'" % self.review_user
else: if self.review_group:
review = "@by_group='%s' and @state='new'" % self.review_group review = osc.core.xpath_join(review, "@by_group='%s' and @state='new'" % self.review_group)
url = osc.core.makeurl(self.apiurl, ('search', 'request'), { 'match': "state/@name='review' and review[%s]" % review, 'withfullhistory': 1 } ) url = osc.core.makeurl(self.apiurl, ('search', 'request'), { 'match': "state/@name='review' and review[%s]" % review, 'withfullhistory': 1 } )
root = ET.parse(osc.core.http_GET(url)).getroot() root = ET.parse(osc.core.http_GET(url)).getroot()