From e942a38dc91bc477a308fd1d9bdddbf35fb74a22 Mon Sep 17 00:00:00 2001 From: Jimmy Berry Date: Tue, 30 May 2017 13:48:01 +0200 Subject: [PATCH] check_source: accept delete repository requests. --- check_source.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/check_source.py b/check_source.py index d18d4978..d4512dab 100755 --- a/check_source.py +++ b/check_source.py @@ -209,6 +209,16 @@ class CheckSource(ReviewBot.ReviewBot): return False def check_action_delete(self, request, action): + if action.tgt_repository is not None: + if action.tgt_project.startswith('openSUSE:'): + self.review_messages['declined'] = 'The repositories in the openSUSE:* namespace ' \ + 'are managed by the Release Managers. For suggesting changes, send a mail ' \ + 'to opensuse-releaseteam@opensuse.org with an explanation of why the change ' \ + 'makes sense.' + return False + else: + self.review_messages['accepted'] = 'unhandled: removing repository' + return True try: result = osc.core.show_project_sourceinfo(self.apiurl, action.tgt_project, True, (action.tgt_package)) root = ET.fromstring(result)