Merge pull request #1465 from jberry-suse/check_source-sle

check_source: SLE: allow in-air-rename and place maintainer review check behind ignore_devel.
This commit is contained in:
Stephan Kulow 2018-03-17 07:10:11 +01:00 committed by GitHub
commit 88a6e975f5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 3 deletions

View File

@ -39,6 +39,7 @@ class CheckSource(ReviewBot.ReviewBot):
config = self.staging_config[project]
self.ignore_devel = not str2bool(config.get('devel-project-enforce', 'False'))
self.in_air_rename_allow = str2bool(config.get('check-source-in-air-rename-allow', 'False'))
self.add_review_team = str2bool(config.get('check-source-add-review-team', 'True'))
self.review_team = config.get('review-team')
self.repo_checker = config.get('repo-checker')
@ -101,7 +102,7 @@ class CheckSource(ReviewBot.ReviewBot):
return False
# We want to see the same package name in the devel project as in the distro; anything else calls for confusion
if source_package != target_package:
if not self.in_air_rename_allow and source_package != target_package:
self.review_messages['declined'] = "No in-air renames: The package must be called the same in the devel project as in the target project"
return False
@ -261,8 +262,9 @@ class CheckSource(ReviewBot.ReviewBot):
# Decline the delete request against linked package.
links = root.findall('sourceinfo/linked')
if links is None or len(links) == 0:
# Utilize maintbot to add devel project review if necessary.
self.maintbot.check_one_request(request)
if not self.ignore_devel:
# Utilize maintbot to add devel project review if necessary.
self.maintbot.check_one_request(request)
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?')

View File

@ -111,6 +111,7 @@ DEFAULT = {
'delreq-review': None,
'main-repo': 'standard',
# check_source.py
'check-source-in-air-rename-allow': 'True',
'repo-checker': 'repo-checker',
'repo_checker-package-comment-devel': '',
'pkglistgen-archs': 'x86_64',