command to check all requests for a project

This commit is contained in:
Ludwig Nussel 2015-04-07 13:57:12 +02:00
parent 5c33b119f4
commit 9a52d5e134

View File

@ -587,6 +587,16 @@ class ABIChecker(ReviewBot.ReviewBot):
return fetchlist, liblist
def set_request_ids_project(self, project):
url = osc.core.makeurl(self.apiurl, ('search', 'request'),
"match=(state/@name='review'+or+state/@name='new')+and+(action/target/@project='%s'+and+action/@type='submit')&withhistory=1"%project)
root = ET.parse(osc.core.http_GET(url)).getroot()
for request in root.findall('request'):
req = osc.core.Request()
req.read(request)
self.requests.append(req)
class CommandLineInterface(ReviewBot.CommandLineInterface):
def __init__(self, *args, **kwargs):
@ -611,6 +621,10 @@ class CommandLineInterface(ReviewBot.CommandLineInterface):
src_rev = opts.revision
print self.checker.check_source_submission(src_project, src_package, src_rev, dst_project, dst_package)
def do_project(self, subcmd, opts, project):
self.checker.set_request_ids_project(project)
self.checker.check_requests()
if __name__ == "__main__":
app = CommandLineInterface()
sys.exit( app.main() )