show ptl details in list-changes output

Part of verifying that a release is OK is ensuring that the liaison or
PTL has signed off. This patch adds information about the PTL to the
list-changes output for easy reference.

Change-Id: I1d88271d2b4a46280b13574c6e1682d8df5700bb
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
This commit is contained in:
Doug Hellmann 2016-07-13 13:06:08 -04:00
parent ed2861a3e5
commit 2b5c5298fa
2 changed files with 11 additions and 1 deletions

View File

@ -129,13 +129,14 @@ def main():
with open(filename, 'r') as f:
deliverable_info = yaml.load(f.read())
header('team info')
header('Team details')
if 'team' in deliverable_info:
team_name = deliverable_info['team']
team_dict = team_data.get(team_name)
if team_dict:
team = governance.Team(team_name, team_dict)
print('found team %s' % team_name)
print(' PTL: %(name)s (%(irc)s)\n' % team.ptl)
deliverable_name = os.path.basename(filename)[:-5] # remove .yaml
deliverable = team.deliverables.get(deliverable_name)
if deliverable:
@ -144,6 +145,7 @@ def main():
print('\nrepo %s\ntags:' % repo.name)
for t in repo.tags:
print(' %s' % t)
print('')
else:
print(('no deliverable %r found for team %r, '
'cannot report on governance status') %

View File

@ -51,6 +51,14 @@ class Team(object):
def __init__(self, name, data):
self.name = name
self.data = data
# Protectively initialize the ptl data structure in case part
# of it is missing from the project list, then replace any
# values we do have from that data.
self.ptl = {
'name': 'MISSING',
'irc': 'MISSING',
}
self.ptl.update(data.get('ptl', {}))
self.deliverables = {
dn: Deliverable(dn, di, self)
for dn, di in self.data.get('deliverables', {}).items()