[check-release-approval] Fix distributed leadership handling
Teams with distributed leadership type have release liaisons listed in governance repository's projects.yaml file instead of a single PTL. This was not handled in the check_approval.py script so far. Fixing this by synchronizing the script with releases repository's tool/check_approval.py script's relevant part. Change-Id: I2433113e1168b10ba03831b30b82e46f3ec1c72f
This commit is contained in:
parent
8d32d45da2
commit
88208ffa0d
@ -125,9 +125,19 @@ class GerritChange(object):
|
||||
approved = False
|
||||
break
|
||||
|
||||
# Fetch PTL and release liaisons
|
||||
# Fetch release liaisons from data/release_liaisons.yaml
|
||||
liaisons = get_liaisons(self.workspace, team)
|
||||
# Some teams may be PTL-less, so don't assume we have PTL info
|
||||
|
||||
# Some teams follow the "distributed project lead" governance
|
||||
# model so they are PTL-less but they have release liaisons
|
||||
# defined. Fetch those liaisons.
|
||||
if govteam.get('leadership_type') == 'distributed':
|
||||
distributed_release_liaisons = govteam['liaisons']['release']
|
||||
for liaison in distributed_release_liaisons:
|
||||
liaisons.append(liaison['email'])
|
||||
|
||||
# Fetch PTL's email address (note: some teams may be PTL-less,
|
||||
# so don't assume we have PTL info)
|
||||
if 'email' in govteam.get('ptl', {}):
|
||||
liaisons.append(govteam['ptl']['email'])
|
||||
LOG.debug('%s needs %s' % (deliv_file, liaisons))
|
||||
|
Loading…
Reference in New Issue
Block a user