Delete requests should be handled by repo checker

Repo-checker at least has some code to validate if it's safe to delete
a package and gives us the information what else we would break with it.

https://progress.opensuse.org/issues/17746
This commit is contained in:
Dominique Leuenberger 2017-03-15 15:42:13 +01:00
parent 1156354ba8
commit d49761ec4d
Signed by untrusted user: dimstar
GPG Key ID: E69F22089B497C99

View File

@ -198,7 +198,8 @@ class CheckSource(ReviewBot.ReviewBot):
# Decline the delete request against linked package. # Decline the delete request against linked package.
links = root.findall('linked') links = root.findall('linked')
if links is None or len(links) == 0: if links is None or len(links) == 0:
self.review_messages['accepted'] = 'Unhandled request type %s' % action.type if not self.skip_add_reviews and self.repo_checker is not None:
self.add_review(self.request, by_user=self.repo_checker, msg='Is this delete request safe?')
return True return True
else: else:
linked = links[0] linked = links[0]