[oqamaint] Fix indentation
This commit is contained in:
parent
8760db67b1
commit
65dc9f8a38
@ -25,7 +25,8 @@ class CommandLineInterface(ReviewBot.CommandLineInterface):
|
|||||||
|
|
||||||
def get_optparser(self):
|
def get_optparser(self):
|
||||||
parser = ReviewBot.CommandLineInterface.get_optparser(self)
|
parser = ReviewBot.CommandLineInterface.get_optparser(self)
|
||||||
parser.add_option("--force", action="store_true", help="recheck requests that are already considered done")
|
parser.add_option("--force", action="store_true",
|
||||||
|
help="recheck requests that are already considered done")
|
||||||
parser.add_option("--no-comment", dest='comment', action="store_false",
|
parser.add_option("--no-comment", dest='comment', action="store_false",
|
||||||
default=True, help="don't actually post comments to obs")
|
default=True, help="don't actually post comments to obs")
|
||||||
parser.add_option("--openqa", metavar='HOST', help="openqa api host")
|
parser.add_option("--openqa", metavar='HOST', help="openqa api host")
|
||||||
|
@ -30,6 +30,7 @@ QA_INPROGRESS = 1
|
|||||||
QA_FAILED = 2
|
QA_FAILED = 2
|
||||||
QA_PASSED = 3
|
QA_PASSED = 3
|
||||||
|
|
||||||
|
|
||||||
class OpenQABot(ReviewBot.ReviewBot):
|
class OpenQABot(ReviewBot.ReviewBot):
|
||||||
|
|
||||||
""" check ABI of library packages
|
""" check ABI of library packages
|
||||||
@ -156,7 +157,8 @@ class OpenQABot(ReviewBot.ReviewBot):
|
|||||||
req_.read(req)
|
req_.read(req)
|
||||||
src_prjs = {a.src_project for a in req_.actions}
|
src_prjs = {a.src_project for a in req_.actions}
|
||||||
if SUSEUpdate.kgraft_target(self.apiurl, src_prjs.pop()):
|
if SUSEUpdate.kgraft_target(self.apiurl, src_prjs.pop()):
|
||||||
self.logger.debug("calculate_incidents: Incident is kgraft - {} ".format(incident))
|
self.logger.debug(
|
||||||
|
"calculate_incidents: Incident is kgraft - {} ".format(incident))
|
||||||
continue
|
continue
|
||||||
|
|
||||||
incidents.append(incident)
|
incidents.append(incident)
|
||||||
@ -439,7 +441,7 @@ class OpenQABot(ReviewBot.ReviewBot):
|
|||||||
comment, info = self.commentapi.comment_find(comments, self.bot_name)
|
comment, info = self.commentapi.comment_find(comments, self.bot_name)
|
||||||
if comment:
|
if comment:
|
||||||
# we only care for two fields
|
# we only care for two fields
|
||||||
return { 'id': comment['id'], 'revision': info['revision']}
|
return {'id': comment['id'], 'revision': info['revision']}
|
||||||
|
|
||||||
return {}
|
return {}
|
||||||
|
|
||||||
@ -523,7 +525,7 @@ class OpenQABot(ReviewBot.ReviewBot):
|
|||||||
|
|
||||||
src_prjs = set([a.src_project for a in req.actions])
|
src_prjs = set([a.src_project for a in req.actions])
|
||||||
if len(src_prjs) != 1:
|
if len(src_prjs) != 1:
|
||||||
raise Exception("can't handle maintenance_release from different incidents")
|
raise Exception("can't handle maintenance_release from different incidents")
|
||||||
build = src_prjs.pop()
|
build = src_prjs.pop()
|
||||||
tgt_prjs = set([a.tgt_project for a in req.actions])
|
tgt_prjs = set([a.tgt_project for a in req.actions])
|
||||||
ret = []
|
ret = []
|
||||||
@ -534,11 +536,13 @@ class OpenQABot(ReviewBot.ReviewBot):
|
|||||||
|
|
||||||
incident_id = build.split(':')[-1]
|
incident_id = build.split(':')[-1]
|
||||||
self.test_job({'project': build, 'id': incident_id, 'channels': [prj]})
|
self.test_job({'project': build, 'id': incident_id, 'channels': [prj]})
|
||||||
issues = self.tgt_repo[self.openqa.baseurl][prj]['settings']['OS_TEST_ISSUES'].split(',')
|
issues = self.tgt_repo[self.openqa.baseurl][prj]['settings']['OS_TEST_ISSUES'].split(
|
||||||
|
',')
|
||||||
# filter empty values
|
# filter empty values
|
||||||
issues = filter(None, issues)
|
issues = filter(None, issues)
|
||||||
issues.append(incident_id)
|
issues.append(incident_id)
|
||||||
self.tgt_repo[self.openqa.baseurl][prj]['settings']['OS_TEST_ISSUES'] = ','.join(issues)
|
self.tgt_repo[self.openqa.baseurl][prj]['settings']['OS_TEST_ISSUES'] = ','.join(
|
||||||
|
issues)
|
||||||
|
|
||||||
def check_suse_incidents(self):
|
def check_suse_incidents(self):
|
||||||
for inc in requests.get('https://maintenance.suse.de/api/incident/active/').json():
|
for inc in requests.get('https://maintenance.suse.de/api/incident/active/').json():
|
||||||
@ -597,5 +601,5 @@ class OpenQABot(ReviewBot.ReviewBot):
|
|||||||
result = 'declined'
|
result = 'declined'
|
||||||
state = 'done'
|
state = 'done'
|
||||||
self.comment_write(project=str(incident_project), state=state,
|
self.comment_write(project=str(incident_project), state=state,
|
||||||
result=result, message=msg,
|
result=result, message=msg,
|
||||||
info_extra={'revision': str(mesh_job.get('openqa_build'))})
|
info_extra={'revision': str(mesh_job.get('openqa_build'))})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user