From 16b851a502af3d00f70960eddaf72d00a68b50c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dirk=20M=C3=BCller?= Date: Mon, 23 Jan 2023 13:49:53 +0100 Subject: [PATCH] Allow specifying a devel project that has "Factory" in its name we should only expand with openSUSE in front if it is starting with "Factory". Also add ALP handling and hide the warning if a full project has been specified. --- osc-staging.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/osc-staging.py b/osc-staging.py index e491e54e..9476ddad 100644 --- a/osc-staging.py +++ b/osc-staging.py @@ -53,14 +53,15 @@ def _full_project_name(self, project): if project.startswith(('openSUSE', 'SUSE')): return project - if 'Factory' in project or 'openSUSE' in project: + if project.startswith('Factory'): return 'openSUSE:%s' % project - if 'SLE' in project: + if project.startswith('SLE') or project.startswith('ALP'): return 'SUSE:%s' % project # If we can't guess, raise a Warning - warnings.warn('%s project not recognized.' % project) + if (':' not in project): + warnings.warn('%s project not recognized.' % project) return project