Rename launchpad parameter to group
In anticipation of storyboard, which has project groups, support a field called 'group' for each project, which will match that project to the appropriate group. For launchpad, use group designation as a mapping to the bug tracker, if it is different. Change-Id: Ied726fece9f32b8417e18c50ad52ae9279778399
This commit is contained in:
parent
352d63e09f
commit
7b73168c2e
@ -70,7 +70,7 @@ def update_spec(launchpad, project, name, subject, link, topic=None):
|
||||
if p.is_no_launchpad_blueprints(project):
|
||||
return
|
||||
|
||||
project = p.git2lp(project)
|
||||
project = p.project_to_group(project)
|
||||
spec = launchpad.projects[project].getSpecification(name=name)
|
||||
if not spec:
|
||||
return
|
||||
|
@ -272,7 +272,7 @@ def find_bugs(launchpad, git_log, args):
|
||||
if p.is_no_launchpad_bugs(project):
|
||||
return []
|
||||
|
||||
project = p.git2lp(project)
|
||||
project = p.project_to_group(project)
|
||||
|
||||
part1 = r'^[\t ]*(?P<prefix>[-\w]+)?[\s:]*'
|
||||
part2 = r'(?:\b(?:bug|lp)\b[\s#:]*)+'
|
||||
|
@ -31,11 +31,10 @@ registry = u.ProjectsYamlRegistry('/home/gerrit2/projects.yaml',
|
||||
'PROJECTS_YAML')
|
||||
|
||||
|
||||
def git2lp(project_full_name):
|
||||
try:
|
||||
return registry[project_full_name]['launchpad']
|
||||
except KeyError:
|
||||
return u.short_project_name(project_full_name)
|
||||
def project_to_group(project_full_name):
|
||||
return registry[project_full_name].get(
|
||||
'group', registry[project_full_name].get(
|
||||
'launchpad', u.short_project_name(project_full_name)))
|
||||
|
||||
|
||||
def _is_no_launchpad(project_full_name, obj_type):
|
||||
|
Loading…
x
Reference in New Issue
Block a user