Ignore starting white space in bugowner lines

workaround for https://github.com/openSUSE/open-build-service/issues/13010
This commit is contained in:
Stephan Kulow 2022-08-30 09:39:03 +02:00
parent 009c133907
commit 449b586cc9
2 changed files with 3 additions and 3 deletions

View File

@ -31,10 +31,10 @@ class CheckerBugowner(ReviewBot.ReviewBot):
for line in self.request.description.splitlines():
matched_package = None
matched_maintainer = None
m = re.match(r'bugowner:\s*(\S*)\s*$', line)
m = re.match(r'\s*bugowner:\s*(\S*)\s*$', line)
if m:
matched_maintainer = m.group(1)
m = re.match(r'bugowner:\s(\S*)\s(\S*)\s*$', line)
m = re.match(r'\s*bugowner:\s(\S*)\s(\S*)\s*$', line)
if m:
matched_maintainer = m.group(2)
matched_package = m.group(1)

View File

@ -90,7 +90,7 @@ class TestCheckBugowner(OBSLocal.TestCase):
self.assertReview(req_id, by_user=(self.bot_user, 'new'))
self.review_bot.set_request_ids([req_id])
self.review_bot.set_request_ids_search_review()
self.review_bot.check_requests()
self.assertReview(req_id, by_user=(self.bot_user, 'accepted'))