Merge pull request #2979 from dcermak/fix-check-src

check_source: fix condition checking for <scmsync> for git packaging
This commit is contained in:
Dirk Mueller 2023-06-27 21:04:55 +02:00 committed by GitHub
commit 8b1c308e45
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -159,9 +159,9 @@ class CheckSource(ReviewBot.ReviewBot):
meta = ET.fromstringlist(show_package_meta(self.apiurl, devel_project, devel_package))
scm_sync = meta.find('scmsync')
if (
not scm_sync or
(scm_sync is None) or
(
scm_sync and
(scm_sync is not None) and
not scm_sync.text.startswith(f"https://src.opensuse.org/pool/{source_package}")
and all(not source_project.startswith(allowed_src) for allowed_src in self.allowed_scm_submission_sources)
)