Fix logic error in gate-project-config-projects-yaml
Previously labels were only being checked for validity if an upstream was given due to a premature 'continue' if no upstream is given before checking labels. Change-Id: I7dd564d59a30ca14bbad4044a985ba08fbe55ca5
This commit is contained in:
parent
619b64e54f
commit
344bdf1faf
@ -60,16 +60,15 @@ for p in projects:
|
||||
# Allow git:// and https:// URLs for importing upstream repositories,
|
||||
# but not git@
|
||||
upstream = p.get('upstream')
|
||||
if not upstream:
|
||||
continue
|
||||
for prefix in VALID_SCHEMES:
|
||||
if upstream.startswith(prefix):
|
||||
break
|
||||
else:
|
||||
found_errors += 1
|
||||
print('Error: Upstream URLs should use a scheme in %s, '
|
||||
'found %s in %s' %
|
||||
(VALID_SCHEMES, p['upstream'], name))
|
||||
if upstream:
|
||||
for prefix in VALID_SCHEMES:
|
||||
if upstream.startswith(prefix):
|
||||
break
|
||||
else:
|
||||
found_errors += 1
|
||||
print('Error: Upstream URLs should use a scheme in %s, '
|
||||
'found %s in %s' %
|
||||
(VALID_SCHEMES, p['upstream'], name))
|
||||
# Check for any wrong entries
|
||||
for entry in p:
|
||||
for label in VALID_LABELS:
|
||||
|
Loading…
x
Reference in New Issue
Block a user