Merge pull request #2024 from jberry-suse/check_tags-deleted-fix

check_tags_in_requests: issue state is deleted not removed.
This commit is contained in:
Stephan Kulow 2019-05-15 06:36:39 +02:00 committed by GitHub
commit 077c32aa27
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -79,13 +79,13 @@ by OBS on which this bot relies.
xml = ET.parse(f)
issues = len(xml.findall('./issues/issue'))
removed = len(xml.findall('./issues/issue[@state="removed"]'))
deleted = len(xml.findall('./issues/issue[@state="deleted"]'))
if issues == 0:
self.logger.debug("reject: diff contains no tags")
return False
if removed > 0:
self.review_messages['accepted'] = 'Warning: {} issues reference(s) removed'.format(removed)
return True
if deleted > 0:
self.review_messages['declined'] = '{} issue reference(s) deleted'.format(deleted)
return False
return True
def checkTagNotRequired(self, req, a):